• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# StateEnum类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: WalkTowards

 public void WalkTowards(Vector3 direction)
 {
     var velocity = direction.normalized * Speed;
     _rigidbody.velocity = velocity;
     transform.forward = velocity;
     if (State != StateEnum.Running)
     {
         State = StateEnum.Running;
         _animator.SetBool("Running", true);
     }
 }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:11,代码来源:DirectionWalker.cs


示例17: OnPointerDown

    public void OnPointerDown(PointerEventData eventData)
    {
        State = StateEnum.InvalidDragging;
        PressPosition = eventData.pressPosition;
        CurrentPosition = eventData.position;
        Debug.LogFormat("OnPointerDown(CurrentPosition={0})@{1}", CurrentPosition, Time.frameCount);
        var pos = PressPosition * 1800f / Screen.width;
        if (TouchCircle) TouchCircle.localPosition = pos;
        if (TouchSpot) TouchSpot.localPosition = Vector3.zero;

        if (OnPointerDownEvent != null) OnPointerDownEvent(this);
    }
开发者ID:stv1024,项目名称:Project4-Bunker,代码行数:12,代码来源:ScreenJoystick.cs


示例18: ExecuteTask

        public bool ExecuteTask()
        {
            output.Clear();
            output.Add(new TaskMessage("Test Task"));
            //MainClass.MainWindow.OutputConsole.WriteText("message");

            //ProcessWrapper pw =MainClass.ProcessService.StartProcess("cmd.exe","/c dir *.*", MainClass.Tools.AppPath, ProcessOutputChange, ProcessErrorChange);
            //MainClass.MainWindow.RunProcess("cmd.exe", "/c dir *.*", MainClass.Tools.TempDir);
            //Console.WriteLine("teST TASk BEZI");
            stateTask = StateEnum.ERROR;
            return false;
        }
开发者ID:moscrif,项目名称:ide,代码行数:12,代码来源:TestTask.cs


示例19: Init

    public void Init()
    {
        _directionWalker = Walker.GetComponent<DirectionWalker>();
        _pathfindingWalker = Walker.GetComponent<PathfindingWalker>();

        State = StateEnum.Idle;
        TouchCircle.gameObject.SetActive(false);
        TouchSpot.gameObject.SetActive(false);
        DragDrop.gameObject.SetActive(false);
        if (JoystickAssistCircle) JoystickAssistCircle.gameObject.SetActive(false);
        if (JoystickAssistSpot) JoystickAssistSpot.gameObject.SetActive(false);
    }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:12,代码来源:WalkJoystick.cs


示例20: OnPointerDown

    public void OnPointerDown(PointerEventData eventData)
    {
        State = StateEnum.InvalidDragging;
        PressPosition = eventData.pressPosition;
        CurrentPosition = eventData.position;
        Debug.LogFormat("CurrentPosition=" + CurrentPosition);
        var pos = PressPosition * 1800f / Screen.width;
        TouchCircle.localPosition = pos;
        RefreshJoystickUI(Vector2.zero);

        ShowUI();
    }
开发者ID:stv1024,项目名称:JoystickInnovation,代码行数:12,代码来源:Joystick.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# StateFlags类代码示例发布时间:2022-05-24
下一篇:
C# State类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap