当前位置: 首页>>代码示例>>C#>>正文


C# StateEnum类代码示例

本文整理汇总了C#中StateEnum的典型用法代码示例。如果您正苦于以下问题:C# StateEnum类的具体用法?C# StateEnum怎么用?C# StateEnum使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


StateEnum类属于命名空间,在下文中一共展示了StateEnum类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: FormCreator

        public FormCreator(ReminderCreator creator)
        {
            InitializeComponent();
            SetText("修改");

            var CategoryList = reminder.CategoryList.ToArray();
            comboBox1.Items.AddRange(CategoryList);
            SetCategory(creator.Category);

            comboBox2.SelectedIndex = (int)creator.Importance;

            state = StateEnum.Modify;

            oldCreator = creator;
            textBox1.Text = oldCreator.Title;
            textBox2.Text = oldCreator.Text;
            textBox3.Text = oldCreator.TimeCode;

            timeList = oldCreator.TimeCache;

            var builder = new StringBuilder();
            foreach (var time in oldCreator.TimeCache)
            {
                builder.AppendLine(time.ToString("yyyy-MM-dd HH:mm:ss"));
            }
            if(oldCreator.AllInCache)
            {
                builder.AppendLine("END");
            }
            textBox4.Text = builder.ToString();
            TimeCodeValid = true;
        }
开发者ID:lockehamann,项目名称:MyReminderV3,代码行数:32,代码来源:FormCreator.cs

示例2: CastSkill

    public void CastSkill(int skillID, Vector3 displacement)
    {
        var costMP = GetSkillCostMP(skillID, displacement.magnitude);
        if (GetSkillTotalCDRemaining(skillID) > 0 || !GetSkillCountEnough(skillID))
        {
            return;
        }

        switch (skillID)
        {
            case 0://跳跃
                if (State == StateEnum.Static && Data.mp + 0.1f >= costMP)
                {
                    State = StateEnum.Jumping;
                    var jumpingTime = MainController.Instance.JumpingTime;
                    DestinationPosition = transform.localPosition + displacement;
                    Data.JumpTime = 0;
                    GetComponent<Rigidbody>().velocity = displacement/jumpingTime -
                                                         Vector3.up*0.5f*MainController.JumpingGravity*jumpingTime;
                    if (Animator)
                    {
                        Animator.SetTrigger("Jump");
                    }
                }
                break;
        }
        CmdCastAtkSkill(skillID, displacement);
    }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:28,代码来源:Unit.cs

示例3: BluetoothManager

 //--------------------------------------------------------------
 // CONSTRUCTORS
 //--------------------------------------------------------------
 public BluetoothManager()
 {
     _deviceAddress = string.Empty;
     _handler = new MyHandler ();
     _bluetoothAdapter = BluetoothAdapter.DefaultAdapter;
     _state = StateEnum.None;
 }
开发者ID:lea-and-anthony,项目名称:Tetrim,代码行数:10,代码来源:BluetoothManager.cs

示例4: MyGuiScreenLoadSandbox

 public MyGuiScreenLoadSandbox()
     : base(new Vector2(0.5f, 0.5f), MyGuiConstants.SCREEN_BACKGROUND_COLOR, new Vector2(0.95f, 0.8f))
 {
     EnabledBackgroundFade = true;
     m_state = StateEnum.ListNeedsReload;
     RecreateControls(true);
 }
开发者ID:ChristianHeinz71,项目名称:SpaceEngineers,代码行数:7,代码来源:MyGuiScreenLoadSandbox.cs

示例5: Init

 public void Init(Camera controlCamera)
 {
     State = StateEnum.Idle;
     HideUI();
     _controlCamera = controlCamera;
     enabled = true;
 }
开发者ID:stv1024,项目名称:Project4-Bunker,代码行数:7,代码来源:ScreenJoystick.cs

示例6: SocketInfo

 public SocketInfo(Socket socket, short headerLength, bool noEncryption)
 {
     Socket = socket;
     State = StateEnum.Header;
     NoEncryption = noEncryption;
     DataBuffer = new byte[headerLength];
     Index = 0;
 }
开发者ID:abcsharp,项目名称:maplelib2withoutnaudio,代码行数:8,代码来源:SocketInfo.cs

示例7: Stop

 public void Stop()
 {
     _navMeshAgent.Stop();
     if (State != StateEnum.Idle)
     {
         State = StateEnum.Idle;
         _animator.SetBool("Running", false);
     }
 }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:9,代码来源:PathfindingWalker.cs

示例8: Stop

 public void Stop()
 {
     _rigidbody.velocity = Vector3.zero;
     if (State != StateEnum.Idle)
     {
         State = StateEnum.Idle;
         _animator.SetBool("Running", false);
     }
 }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:9,代码来源:DirectionWalker.cs

示例9: WalkTo

 public void WalkTo(Vector3 position)
 {
     _navMeshAgent.Resume();
     _navMeshAgent.SetDestination(position);
     if (State != StateEnum.Running)
     {
         State = StateEnum.Running;
         _animator.SetBool("Running", true);
     }
 }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:10,代码来源:PathfindingWalker.cs

示例10: OnPointerUp

    public void OnPointerUp(PointerEventData eventData)
    {
        CurrentPosition = eventData.position;

        State = StateEnum.Idle;
        TouchCircle.gameObject.SetActive(false);
        TouchSpot.gameObject.SetActive(false);
        DragDrop.gameObject.SetActive(false);
        OriginalDrop.SetActive(true);
    }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:10,代码来源:CellJumpJoystick.cs

示例11: OnPointerDown

    public void OnPointerDown(PointerEventData eventData)
    {
        State = StateEnum.InvalidDragging;
        PressPosition = eventData.pressPosition;
        CurrentPosition = eventData.position;

        var pos = PressPosition * 1800f/Screen.width;
        TouchCircle.localPosition = pos;
        TouchSpot.localPosition = Vector3.zero;
    }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:10,代码来源:WalkJoystick.cs

示例12: Pause

    IEnumerator Pause()
    {
        if (pauseKeyPressed)
        {
            Time.timeScale = 0;
            GameState = StateEnum.Pause;
        }

        yield break;
    }
开发者ID:ranmaru90,项目名称:LD33_MYCUPOFFURY,代码行数:10,代码来源:GameStateManager.cs

示例13: GetAcition

    public AI_Action GetAcition()
    {
        if (actions.Count == 0)
            return new AI_Action();
        AI_Action action = actions[0];
        actions.RemoveAt(0);
        if (actions.Count == 0)
            state = StateEnum.Idle;

        return action;
    }
开发者ID:hyf042,项目名称:BakeryGirl_Chess,代码行数:11,代码来源:AIPlayer.cs

示例14: OnPointerUp

    public void OnPointerUp(PointerEventData eventData)
    {
        CurrentPosition = eventData.position;
        ResetAssistPlaneRotation();

        if (_directionWalker) _directionWalker.Stop();
        if (_pathfindingWalker) _pathfindingWalker.Stop();

        State = StateEnum.Idle;
        HideUI();
    }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:11,代码来源:Joystick.cs

示例15: SensorInit

        private void SensorInit(string Id, string State, string Description, float PingInterval)
        {
            this.Id = Id;
              this.State = (StateEnum)Enum.Parse(typeof(StateEnum), State);
              this.Description = (Description == null) ? "(None)" : Description;
              this.PingInterval = PingInterval;

              this.LastMsgSent = null;
              this.LastReading = -1;
              this.LastReadingTime = string.Empty; // Default Date value, meaning uninitialized
        }
开发者ID:sam17,项目名称:sensit,代码行数:11,代码来源:NetworkNodes.cs


注:本文中的StateEnum类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。