Exemple #1
0
 private void OnDeath()
 {
     if (Network.isServer)
     {
         DestructableManager.DestroyProp(this);
     }
 }
	void Awake ()
	{
		Debug.Log ("Manager assigned");
		instance = this;
		spawners = new List<DestructableSpawner> ();
		props = new Dictionary<int, DestructableProp> ();
	}
Exemple #3
0
 void Awake()
 {
     Debug.Log("Manager assigned");
     instance = this;
     spawners = new List <DestructableSpawner> ();
     props    = new Dictionary <int, DestructableProp> ();
 }
 private void Awake()
 {
     if (instance != null)
     {
         Destroy(this);
     }
     else
     {
         instance = this;
     }
 }
    public void DUpdate()
    {
        if (dInstance != null)
        {
            respawnFromSync = Time.time;
            return;
        }

        if (Time.time - respawnFromSync > RespawnTime)
        {
            dInstance = DestructableManager.CreateProp(DProp, transform.position, transform.rotation);
        }
    }
 void Start()
 {
     DestructableManager.AddSpawner(this);
 }