Exemplo n.º 1
0
    // 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)
    {
        BossEnemyController enemy = animator.gameObject.GetComponent <BossEnemyController>();

        enemy.StopChargingUp();
    }
Exemplo n.º 2
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)
    {
        BossEnemyController enemy = animator.gameObject.GetComponent <BossEnemyController>();

        enemy.StartIdle();
    }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        InvokeRepeating ("BeatTime", 2,1);
        Reset = false;
        GetComponent<BossEnemyController>().health = 10;
        phase++;
        BossCon = GetComponent<BossEnemyController> ();
        rb = GetComponent<Rigidbody>();
        //looking at spawner
        BossES = GameObject.FindWithTag ("BossZone");
        ESZone = BossES.GetComponent<BossEnemyZone> ();
        NoEnemies = false;
        anim = GetComponent<Animator> ();

        speed = 7.5f * Time.deltaTime;
        playerPosition = (GameObject.Find ("Player").transform.position);
        MoveTarget = playerPosition;
        //pedastal
        Pedastal = (GameObject.FindWithTag ("Pedastal").transform.position);
    }