Esempio n. 1
0
    public void OnGeneralDead(WhichSide side)
    {
        state          = State.Dead;
        Time.timeScale = 0.5f;

        if (side == WhichSide.Left)
        {
            rightGeneral.SetIdle();
            SetCameraMoveTo(leftGeneral.transform.localPosition);

            for (int i = 0; i < leftSoliders.Count; i++)
            {
                leftSoliders[i].SetEscape();
            }
        }
        else
        {
            leftGeneral.SetIdle();
            SetCameraMoveTo(rightGeneral.transform.localPosition);

            for (int i = 0; i < rightSoliders.Count; i++)
            {
                rightSoliders[i].SetEscape();
            }
        }

        SoundController.Instance.PlaySound("00023");
    }