Exemple #1
0
    /**
     * Respawns the player object on first network start position,
     * if the players hp is less or equal 0.
     */
    void Respawn()
    {
        var pos = NetworkManager.singleton.startPositions[0];

        _rig.position = new Vector2(pos.position.x, pos.position.y);
        _energyManager.CmdResetHeal();
    }