public void Update_State(Boss_States state)
    {
        if (!Has_Died)
        {
            State = state;
            switch (state)
            {
            case Boss_States.Cinematic:
                break;

            case Boss_States.Attack:
                // Make Boss Health bar visible
                HUD.Start_Battle();
                break;

            case Boss_States.Wait:
                break;

            case Boss_States.Dead:
                // Update HUD
                HUD.End_Battle();
                // Fade out Boss Music slowly
                Audio_Mixer_Control.current.Fade_Boss(-80, 0.4f);
                // Disable hurt Box and hitbox
                Electricity_Manager_Hit_Box.enabled = false;
                Attack_Box.SetActive(false);
                // Block any other state pdates
                Has_Died = true;
                // Play death sound
                Audio_Prefab_Sp.Play_A_Sound(0);

                // Load next Level
                Boss_Load_Next_Le.Load_Next_Level();
                break;

            default:
                break;
            }
            // Update States for all script in need
            Electricity_Manager_Mo.Update_State(state);
            Electricicy_Manager_At.Update_State(state);
            Electricity_Manager_An.Update_State(state);
            //Doom_Shroom_Att.Update_State(state);
            Debug.Log("Updated Boss states to " + Get_States());
        }
    }
Пример #2
0
    public void Update_State(Boss_States state)
    {
        if (!Has_Died)
        {
            State = state;
            switch (state)
            {
            case Boss_States.Cinematic:
                break;

            case Boss_States.Attack:

                HUD.Start_Battle();
                break;

            case Boss_States.Wait:
                break;

            case Boss_States.Dead:
                // Set Colision to trigger to make player able to walk "arround" the boss and stop gravity to prevent boss from falling ito the void
                RGB_Slime_RB.gravityScale     = 0;
                RGB_Slime_Collision.isTrigger = true;
                // Update HUD
                HUD.End_Battle();
                // Disable hurt Box and
                RGB_Slime_HitBox.Is_Enabled = false;
                RGB_Slime_Mo.Freeze();
                // Block any other state pdates
                Has_Died = true;
                // Fade out Boss music
                Audio_Mixer_Control.current.Fade_Boss(-80, 0.6f);
                // Load next level
                Boss_Load_Next_Le.Load_Next_Level();
                break;

            default:
                break;
            }
            // Update States for all script in need
            RGB_Slime_Mo.Update_State(state);
            RGB_Slime_Att.Update_State(state);
            Debug.Log("Updated Boss states to " + Get_States());
        }
    }
Пример #3
0
    public void Update_State(Boss_States state)
    {
        if (!Has_Died)
        {
            State = state;
            // Call functions expected functions when there is a new state
            switch (state)
            {
            case Boss_States.Cinematic:
                break;

            case Boss_States.Attack:
                Doom_Shroom_Mo.Refresh_Ground_Check();
                HUD.Start_Battle();
                break;

            case Boss_States.Wait:
                break;

            case Boss_States.Dead:
                // Set Colision to trigger to make player able to walk "arround" the boss and stop gravity to prevent boss from falling ito the void
                Doom_Shroom_RB.gravityScale     = 0;
                Doom_Shroom_Collision.isTrigger = true;
                // Update HUD
                HUD.End_Battle();
                // Fade out Boss Music slowly
                Audio_Mixer_Control.current.Fade_Boss(-80, 0.4f);
                // Disable hurt Box and
                Doom_Shroom_HitBox.Is_Enabled = false;
                // Block any other state pdates
                Has_Died = true;
                // Change level
                Boss_Load_Next_Le.Load_Next_Level();
                break;

            default:
                break;
            }
            // Update States for all script in need
            Doom_Shroom_Mo.Update_State(state);
            Doom_Shroom_Att.Update_State(state);
            Debug.Log("Updated Boss states to " + Get_States());
        }
    }
Пример #4
0
    // Update state and launch apropriate functions
    public void Update_State(Boss_States state)
    {
        State = state;
        if (!Has_Died)
        {
            switch (State)
            {
            case Boss_States.Cinematic:
                break;

            case Boss_States.Attack:

                HUD.Start_Battle();
                break;

            case Boss_States.Wait:
                break;

            case Boss_States.Dead:
                HUD.End_Battle();
                Store_Janitor_HitBox.Is_Enabled = false;
                // Update other scripts
                Store_Janitor_Mo.Update_State(State);
                Store_Janitor_Att.Update_State(State);
                // Set variable
                Has_Died = true;
                // Load Next Level
                Boss_Load_Next_Le.Load_Next_Level();
                // Fade out boss music volume
                Audio_Mixer_Control.current.Fade_Boss(-80, 0.5f);
                break;

            default:
                break;
            }
            // Update movement
            Store_Janitor_Mo.Update_State(State);
            Store_Janitor_Att.Update_State(State);
            Store_Janitor_He.Update_State(State);
            Debug.Log("Updated state to " + State);
        }
    }