Beispiel #1
0
    private void Move()
    {
        if (CurrentHealth.GetHealth() != 0 && !attackArea.GetAttackAreaState() &&
            !AnimatorInfo.GetCurrentAnimatorStateInfo(0).IsName("musketeer_stun") &&
            !AnimatorInfo.GetCurrentAnimatorStateInfo(0).IsName("musketeer_idle"))
        {
            if (itemTarget == null)   /// if no collectable items has been set as the target
            {
                if (BossScene)
                {
                    target = wayPointSystem.GetCoordinateWaypoint();
                    SetTargetRotation(target);
                }
                else
                {
                    target = wayPointSystem.GetCoordinateWaypoint();
                    SetTargetRotation(target);
                }
            }
            else
            {
                target = wayPointSystem.FindTarget();                  //// Set Item As NextPosition
                SetTargetRotation(target);
            }

            if (AnimatorInfo.GetCurrentAnimatorStateInfo(0).IsName("musketeer_idle") && !attackArea.GetAttackAreaState())
            {
                animations_Controller.SetIdle = false;
                animations_Controller.SetMove = true;
            }
        }
    }
Beispiel #2
0
 void Update()
 {
     if (gameObject.tag == "Boss")
     {
         coordYofTarget = boss.GetCoordinateWaypoint().position.y;
         SetPositionRelativeToBossXZ();
     }
     else
     {
         coordYofTarget = waypointSystem.GetCoordinateWaypoint().position.y;
         SetPositionRelativeToCharacterXZ();
     }
 }