예제 #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;
        }