public override MobBehaviour spawn(string name, ISpawnProperties <MobBehaviour> spawnProperties) { MobBehaviour mb = base.spawn(name, spawnProperties); if (mb != null) { MobsSeen.instance.seeMob(name); } return(mb); }
//Spawn whatever this manager manages, activate them, and initialize them based on //the given spawn properties public virtual T spawn(string name, ISpawnProperties <T> spawnProperties) { T t; GameObject g; if (this.pools.tryGetComponent <T>(name, out t, out g)) { if (t != null) { g.transform.SetParent(this.roomTransform); spawnProperties.spawn(t); g.SetActive(true); } } return(t); }