Beispiel #1
0
    public void NinjaDies()
    {
        Particles_DeathBoom.Emit(50);

        this.gameObject.transform.position         = ActiveCheckpoint.transform.position;
        this.GetComponent <Rigidbody2D>().velocity = Vector2.zero;

        //Send message to MainEventsLog. First checks if the reference path is set. If not, it will MainEventsLog from the scene.
        if (MainEventsLog_script == null)
        {
            MainEventsLog_script = GameObject.FindGameObjectWithTag("MainEventLog").GetComponent <MainEventsLog>();
        }
        MainEventsLog_script.PlayerDied();
    }
Beispiel #2
0
    public void NinjaDies()
    {
        Particles_DeathBoom.Emit(50);


        this.gameObject.transform.position         = ActiveCheckpoint.transform.position;
        this.GetComponent <Rigidbody2D>().velocity = Vector2.zero;



        if (MainEventsLog_script == null)
        {
            MainEventsLog_script = GameObject.FindGameObjectWithTag("MainEventLog").GetComponent <MainEventsLog>();
        }
        MainEventsLog_script.PlayerDied();
    }