public override void OnStartServer()
    {
        base.OnStartServer();

        // trigger event denoting server started
        NetworkServerStartEvent.Trigger();

        /*// get zombie network spawnable prefab
         * GameObject zombieSpawnPrefab = spawnPrefabs.Find(prefab => prefab.name == "Zombie");
         * // instanitate zombie into world
         * GameObject spawnedZombie = Instantiate(zombieSpawnPrefab, new Vector3(10f, 0f, 10f), Quaternion.identity);
         * // spawn the created zombie on the network
         * NetworkServer.Spawn(spawnedZombie);*/
        //GameManager.Instance.SpawnEnemy(new Vector3(10f, 0f, 10f), Quaternion.identity);
    }
Exemplo n.º 2
0
 public void OnMMEvent(NetworkServerStartEvent eventType)
 {
     // destroys this object if it is not connected to a network session
     DestroyIfNotConnectedToNetwork();
 }