protected override void PerformingTick() { base.PerformingTick(); if (lastSpawn == null) { lastSpawn = (GameEntity)Activator.CreateInstance(Type); var p = Game.Instance.Scene.GetByName(Point); lastSpawn.Position = p.Translation; var u = lastSpawn as Unit; if (u != null) { u.CanControlMovementBlockers++; u.CanControlRotationBlockers++; u.CanPerformAbilitiesBlockers++; } lastSpawn.EditorInit(); lastSpawn.GameStart(); Game.Instance.Scene.Root.AddChild(lastSpawn); Game.Instance.Scene.Root.AddChild(new Effects.SpawnEntityEffect { Translation = p.Translation }); } else { var u = lastSpawn as Unit; if (lastSpawn.IsRemoved || (u != null && u.State != UnitState.Alive)) { lastSpawn = null; } } }