public Super CreateSuper() { Super temp = ((Super)(Find(GameObjName.Super))); if (temp != null) { ((Super)(Find(GameObjName.Super))).Purge(); } ColObj _colobj = new ColObj(Rectangle.Empty, ColObjName.Super, SpriteName.BBox); ColObjManager.getInstance().Add(_colobj); Super Obj; if (temp != null) { Obj = temp; Obj.BombPool = temp.BombPool; } else { Obj = new Super(GameObjName.Super, _colobj, new Vector2(0, 0)); Obj.BombPool = new BombReserve(); ColGroup Invaders = ColGroupManager.getInstance().find(ColGroupName.Alien); Invaders.Add(Obj); GameObjMananger.getInstance().Add(Obj); } Obj.Create(); return(Obj); }
public override void VisitSuper(Super inSuper) { if (inSuper.CheckColumns(this)) { ((Ship)(GameObjMananger.getInstance().Find(GameObjName.Ship))).ReloadMissile(); } }
private void ReactToWall(Super inSuper) { if (inSuper.Step) { inSuper.direction.X *= -1; inSuper.direction.Y = 5; inSuper.Step = false; } }
public static void Act(Super Supah) { Supah.Action(); TimeSpan FrameInterval = new TimeSpan(0, 0, 0, 0, 1000 - GameManager.getInstance().getDifficulty());//new TimeSpan(5750000); TimeEventManager.getInstance().Add(TimeEventManager.getInstance().GetCurrentTime() + FrameInterval, Supah, delegate { Actions.Act(Supah); }); Sound Effect = (Sound)SoundManager.getInstance().Find(SoundName.AlienMove); Effect.PlaySoundLib(); }
public void StartTimedEvents() { TimeSpan FrameInterval = new TimeSpan(5750000); Super Super = (Super)GameObjMananger.getInstance().Find(GameObjName.Super); TimeEventManager.getInstance().Add(TimeEventManager.getInstance().GetCurrentTime() + FrameInterval, Super, delegate { Actions.Act(Super); }); FrameInterval = new TimeSpan(0, 0, 15); UFO ufo = (UFO)GameObjMananger.getInstance().Find(GameObjName.UFO); TimeEventManager.getInstance().Add(TimeEventManager.getInstance().GetCurrentTime() + FrameInterval, ufo, delegate { Actions.Act(ufo); }); }
public void NextLevel() { CurrLevel++; Difficulty = CurrLevel * 50; if (Difficulty > 200) { Difficulty = 200; } Super temp = GameObjMananger.getInstance().CreateSuper(); temp.direction.Y = 50; }
public bool CheckParts(Super inSuper) { ListNode ptr = (ListNode)ShieldParts.getActiveHead(); while (ptr != null) { ShieldPart temp = (ShieldPart)ptr.getData(); if (inSuper.CheckColumns(temp)) { ListNode inTemp = (ListNode)ptr.pNext; ShieldParts.Remove(ptr); ptr = inTemp; } else { ptr = (ListNode)ptr.pNext; } } return(true); }
public override void VisitSuper(Super inSuper) { if (CheckParts(inSuper)) { } }
public virtual void VisitSuper(Super inSuper) { }
public override void VisitSuper(Super inSuper) { ReactToWall(inSuper); }