예제 #1
0
 public void Awake()
 {
     flyboy = GetComponent <FlyingBot>();
     FlyingBot_StateSpawning        = GameObject.Find("MurderBot").GetComponent <State_Spawning>();
     FlyingBot_StateSearchForPlayer = GameObject.Find("MurderBot").GetComponent <State_SearchingForPlayer>();
     Flyingbot_StateMoving          = this.GetComponentInParent <State_Moving>();
     Flyingbot_StateFiring          = this.GetComponentInParent <State_Attacking>();
     Flyingbot_StateShotFired       = this.GetComponent <State_ShotFired>();
     Flyingbot_StateHit             = new State_Hit(this);
     State = FlyingBot_StateSpawning;
 }
예제 #2
0
    protected virtual void Awake()
    {
        myRigidbody = GetComponent <Rigidbody2D>();

        //Animation
        myAnimator = GetComponent <Animator>();


        //State
        attackState       = GetComponent <State_Attack>();
        deathState        = GetComponent <State_Death>();
        dodgeState        = GetComponent <State_Dodge>();
        guardState        = GetComponent <State_Guard>();
        hitState          = GetComponent <State_Hit>();
        idleState         = GetComponent <State_Idle>();
        moveState         = GetComponent <State_Move>();
        battle_idleState  = GetComponent <State_Battle_Idle>();
        skillUseState     = GetComponent <State_SkillUse>();
        targetSearchState = GetComponent <State_TargetSearch>();
    }