Exemple #1
0
    void PlayerSpawnLargeBox(Player player, TypeOfGun.myType type)
    {
        DestroyableObject largeBox = Instantiate(ServerManager.instance.objectsToSpawn[3]).GetComponent <DestroyableObject>();

        largeBox.transform.position = player.gun.transform.position;
        largeBox.transform.right    = player.transform.right;
        largeBox.playerId           = player.connectionId;
        largeBox.Setup(lifeLargeBox);
        NetworkServer.Spawn(largeBox.gameObject);
    }