Esempio n. 1
0
    public static void OnDeath(Character character)
    {
        character.Movement.SetIsDead(true);
        CameraBehavior camera = character.gameObject.GetComponentInChildren <CameraBehavior>();

        camera.SetCameraPosition(character.gameObject.transform.position);
//		Debug.Log("camera.gameObject.transform.localPosition: " + camera.gameObject.transform.localPosition);
        character.gameObject.transform.position = GameObject.Find("Checkpoint Manager").GetComponent <CheckpointManager>().GetCurrentCheckpointPosition();
        camera.ResetCamera();
//		character.gameObject.GetComponentInChildren<SpriteRenderer>().enabled = false;
    }