Example #1
0
    //cnc

    void Awake()
    {
        obj                  = this;
        playerRigidbody      = GetComponent <Rigidbody>();
        _mainCameraTransform = Camera.main.GetComponent <Transform>();
        _transform           = GetComponent <Transform>();
    }
Example #2
0
    public static void PlayerDied()
    {
        if (instance.player == null)
        {
            return;
        }

        PlayerMovementAndLook playerMove = instance.player.GetComponent <PlayerMovementAndLook>();

        playerMove.PlayerDied();

        instance.player = null;
    }