Esempio n. 1
0
    // Start is called before the first frame update
    public void Kill()
    {
        enemyPlayer.death = true;
        StartCoroutine(Enemydying());
        isDying = true;
        GetComponent <BoxCollider>().enabled = false;
        playerENnemy.GetComponent <Rigidbody>().isKinematic = false;
        playerData.isMovable = true;

        //  Debug.Log("kill");
        if (tutorialScene == false && !killedonce)
        {
            killedonce = true;
            gameEnd.Delete();
        }
        //playerEnergy.AddEnergy(playerData.energyGainedByKillingEnemy);
        playerENnemy.OnRelease();
        //play
    }