Example #1
0
    public void Initialize(
        AIProperties properties,
        VelocityBody velBody,
        Animator animator,
        Stats stats,
        NavMeshAgent navAgent,
        NavMeshObstacle navObstacle,
        BulletHellPatternController bulletPatternController,
        List <AIState> aiStates)
    {
        this.properties  = properties;
        this.stats       = stats;
        this.animator    = animator;
        this.navAgent    = navAgent;
        this.navObstacle = navObstacle;

        states = new States();
        states.Initialize(properties, this, velBody, animator, stats, navAgent, navObstacle, bulletPatternController, aiStates);

        if (mod != null)
        {
            modMemento.Initialize(mod.transform);
        }

        //CurrentState = states.getUp;
    }
Example #2
0
        public void Initialize(
            AIProperties properties,
            AIController controller,
            VelocityBody velBody,
            Animator animator,
            Stats stats,
            NavMeshAgent navAgent,
            NavMeshObstacle navObstacle,
            BulletHellPatternController bulletPatternController,
            List <AIState> aiStatesElements)
        {
            aiStates = new Dictionary <EAIState, AIState>();

            foreach (AIState state in aiStatesElements)
            {
                state.Initialize(properties, controller, velBody, animator, stats, navAgent, navObstacle, bulletPatternController);

                if (state.stateName.Equals("chase"))
                {
                    chase = state;
                    aiStates.Add(EAIState.Chase, chase);
                }
                else if (state.stateName.Equals("attack"))
                {
                    attack = state;
                    aiStates.Add(EAIState.Attack, attack);
                }

                else if (state.stateName.Equals("fire"))
                {
                    fire = state;
                    aiStates.Add(EAIState.Fire, fire);
                }

                else if (state.stateName.Equals("death"))
                {
                    death = state;
                    aiStates.Add(EAIState.Death, death);
                }
                else if (state.stateName.Equals("stun"))
                {
                    stun = state;
                    aiStates.Add(EAIState.Stun, stun);
                }
                else if (state.stateName.Equals("celebrate"))
                {
                    celebrate = state;
                    aiStates.Add(EAIState.Celebrate, celebrate);
                }
                else if (state.stateName.Equals("getUp"))
                {
                    getUp = state;
                    aiStates.Add(EAIState.GetUp, getUp);
                }
            }
        }
Example #3
0
 public void Initialize(
     AIProperties properties,
     AIController controller,
     VelocityBody velBody,
     Animator animator,
     Stats myStats,
     NavMeshAgent navAgent,
     NavMeshObstacle navObstacle)
 {
     this.properties  = properties;
     this.controller  = controller;
     this.velBody     = velBody;
     this.animator    = animator;
     this.myStats     = myStats;
     this.navAgent    = navAgent;
     this.navObstacle = navObstacle;
 }