Пример #1
0
    public static BaseState CreateBaseState(StateType stateType, EnemyController controller)
    {
        BaseState returnState = null;

        switch (stateType)
        {
        case StateType.AvoidBullet:
            returnState = new AvoidBulletState(controller);
            break;

        case StateType.Search:
            returnState = new SearchState(controller);
            break;

        case StateType.Strafe:
            returnState = new StrafeState(controller);
            break;

        case StateType.None:
            returnState = new NoneState(controller);
            break;
        }
        return(returnState);
    }
Пример #2
0
    private int num;                       //ランダムの値を代入

    // Start is called before the first frame update
    void Start()
    {
        polNoneState = polStateManager.GetComponent <NoneState>();
        casnoneState = casStateManager.GetComponent <NoneState>();
    }