示例#1
0
文件: Actor.cs 项目: Argamente/Unknow
        void Awake ()
        {
            actionForIdle = this.gameObject.AddComponent<ActionForIdle> ();
            actionForMoveUp = this.gameObject.AddComponent<ActionForMoveUp> ();
            actionForMoveDown = this.gameObject.AddComponent<ActionForMoveDown> ();
            actionForMoveLeft = this.gameObject.AddComponent<ActionForMoveLeft> ();
            actionForMoveRight = this.gameObject.AddComponent<ActionForMoveRight> ();

            actionForMoveUp.moveSpeed = this.moveSpeed;
            actionForMoveDown.moveSpeed = this.moveSpeed;
            actionForMoveRight.moveSpeed = this.moveSpeed;
            actionForMoveLeft.moveSpeed = this.moveSpeed;
        }
示例#2
0
文件: Actor.cs 项目: Argamente/Unknow
        void Awake()
        {
            actionForIdle      = this.gameObject.AddComponent <ActionForIdle> ();
            actionForMoveUp    = this.gameObject.AddComponent <ActionForMoveUp> ();
            actionForMoveDown  = this.gameObject.AddComponent <ActionForMoveDown> ();
            actionForMoveLeft  = this.gameObject.AddComponent <ActionForMoveLeft> ();
            actionForMoveRight = this.gameObject.AddComponent <ActionForMoveRight> ();

            actionForMoveUp.moveSpeed    = this.moveSpeed;
            actionForMoveDown.moveSpeed  = this.moveSpeed;
            actionForMoveRight.moveSpeed = this.moveSpeed;
            actionForMoveLeft.moveSpeed  = this.moveSpeed;
        }