Exemple #1
0
    public override void DoBeforeEntering()
    {
        if (controlref.tag == "Player")
        {
            controlref.GetComponent<ActorFSM>().setDeathText("trap");
            SoundController.instance.TrapOn(controlref.fireBlazin, controlref.fireBlazin);
            if (controlref.actorName == "Roy")
            {
                SoundController.instance.RoyVoice(controlref.royDeath, controlref.royDeath);
            }
            else if (controlref.actorName == "Jake")
            {
                SoundController.instance.JakeVoice(controlref.jakeDeath, controlref.jakeDeath);
            }
            else if (controlref.actorName == "Emily")
            {
                SoundController.instance.EmilyVoice(controlref.emilyDeath, controlref.emilyDeath);
            }
            else if (controlref.actorName == "Tank")
            {
                SoundController.instance.TankVoice(controlref.tankDeath, controlref.tankDeath);
            }

            controlref.gm.GetComponent<GameMasterFSM>().zombie.GetComponent<SocialPlatform>().AchievementProgress(GPGSIds.achievement_its_a_trap, false);
        }
        else if (controlref.tag == "Enemy")
        {
            if (controlref.actorName == "Shadow")
            {
                SoundController.instance.ShadowVoice(controlref.enemyKilled, controlref.enemyKilled);
            }
            else if (controlref.actorName == "Wraith")
            {
                SoundController.instance.WraithVoice(controlref.enemyKilled, controlref.enemyKilled);
            }

            controlref.gm.GetComponent<GameMasterFSM>().zombie.GetComponent<SocialPlatform>().AchievementProgress(GPGSIds.achievement_gr8_b8_m8, true, 1);
        }
    }
Exemple #2
0
    public override void DoBeforeEntering()
    {
        if (controlref.tag == "Player")
        {
            UnityEngine.Object.Instantiate(controlref.slash, controlref.transform.position, Quaternion.identity);
            controlref.GetComponent<ActorFSM>().setDeathText("enemy");
            //SoundController.instance.RandomSfx (controlref.playerDeath, controlref.playerDeath);
            if (controlref.actorName == "Roy")
            {
                SoundController.instance.RoyVoice(controlref.royDeath, controlref.royDeath);
            }
            else if (controlref.actorName == "Jake")
            {
                SoundController.instance.JakeVoice(controlref.jakeDeath, controlref.jakeDeath);
            }
            else if (controlref.actorName == "Emily")
            {
                SoundController.instance.EmilyVoice(controlref.emilyDeath, controlref.emilyDeath);
            }

            controlref.gm.GetComponent<GameMasterFSM>().zombie.GetComponent<SocialPlatform>().AchievementProgress(GPGSIds.achievement_hello_darkness, false);
        }
    }