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; }
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; }