Пример #1
0
    public void Be_Attacked()
    {
        Mob_Basic_Mo.Set_Agro(true);
        Current_Health--;

        if (Current_Health > 0)
        {
            // If bot is alive
            Mob_Basic_An.Launch_Stunt_Animation();
        }
        else
        {
            // If bot is Dead
            // Disable Attack Box
            GetComponentInChildren <Mob_Basic_Attack>().Is_Enabled = false;
            // Launch Animation
            Mob_Basic_An.Launch_Death_Animation();
            Mob_Basic_Mo.Set_Life(false);
            StartCoroutine(Destruction());
        }
    }
Пример #2
0
    public void Be_Attacked()
    {
        WatcherRobot_Mo.Set_Agro(true);
        Current_Health--;
        print("Watcher Agro");
        if (Current_Health > 0)
        {
            // If bot is alive
            // Make mob angry

            Blue_Slime_An.Launch_Stunt_Animation();
        }
        else
        {
            // If bot is Dead
            // Disable Attack Box

            // Launch Animation
            Audio_Prefab_Sp.Play_A_Sound(0);
            StartCoroutine(Destruction());
            Blue_Slime_An.Launch_Death_Animation();
        }
    }
Пример #3
0
 public void Be_Attacked()
 {
     WatcherRobot_Mo.Set_Agro(true);
     Current_Health--;
     print("Watcher Agro");
     if (Current_Health > 0)
     {
         // If bot is alive
         // Make mob angry
         Watcher_Robot_St.Update_State(WatcherRobot_States.Watcher_States.Agro);
         Watcher_Robot_An.Launch_Stunt_Animation();
     }
     else
     {
         // If bot is Dead
         // Disable Attack Box
         Watcher_Robot_St.Update_State(WatcherRobot_States.Watcher_States.Dead);
         // Launch Animation
         Watcher_Robot_St.Be_Attacked();
         StartCoroutine(Destruction());
         Watcher_Robot_An.Launch_Death_Animation();
     }
 }