Ejemplo n.º 1
0
 public override void Enter(GameObject owner)
 {
     Debug.Log("Charging!");
     player_  = owner.GetComponent <Boss1AI>().player_;
     rb2d_    = owner.GetComponent <Rigidbody2D>();
     boss1ai_ = owner.GetComponent <Boss1AI>();
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Awake()
 {
     if (GetComponentInParent <Boss1AI>())
     {
         boss1AI = GetComponentInParent <Boss1AI>();
     }
     else
     {
         Debug.Log("Tail cant find the boss1AI");
     }
 }
Ejemplo n.º 3
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    //override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateUpdate is called on each Update frame between OnStateEnter and OnStateExit callbacks
    //override public void OnStateUpdate(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    //{
    //
    //}

    // OnStateExit is called when a transition ends and the state machine finishes evaluating this state
    override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        playerAI = animator.gameObject.GetComponent <Boss1AI>();

        if (playerAI != null)
        {
            Debug.Log("The player name is " + playerAI.name);
            playerAI.Boss1StartAttack();
            playerAI.StartAttack = false;
        }
    }
Ejemplo n.º 4
0
 void Start()
 {
     AIController = transform.parent.GetComponent <Boss1AI> ();
 }
Ejemplo n.º 5
0
 public StateMachine(Boss1AI boss)
 {
     _boss = boss;
 }