예제 #1
0
        protected void Awake()
        {
            // 変数初期化
            MovingStarList = new List <GameObject>();
            takoModel      = transform.GetChild(0).gameObject;
            animator       = takoModel.GetComponent <Animator>();
            takoScript     = GetComponent <TakoController>();

            // ステートを生成
            AddState(new StateNormal(this, gameObject));
            AddState(new StateWaitingForKineticPowerEnd(this, gameObject));
            AddState(new StateCommandDisable(this, gameObject));
            AddState(new StateMovingBetweenStars(this, gameObject));
            AddState(new StateStayingGoal(this, gameObject));

            // 現在のステートをセット
            SetCurrentState(StateList.Find(m => m.Name == StateName.Normal));
        }