public override void Update(FrameTick elapsedTime) { if (ZoneManager.Instance.CurrentGround != null) { //Make entities think! foreach (GroundEntity ent in ZoneManager.Instance.CurrentGround.IterateEntities()) { if (ent.EntEnabled && ent.GetType().IsSubclassOf(typeof(GroundAIUser))) { GroundAIUser tu = (GroundAIUser)ent; tu.Think(); } } //update the hitboxes' movements //update the team/enemies foreach (GroundChar character in ZoneManager.Instance.CurrentGround.IterateCharacters()) { if (character.EntEnabled) { character.Update(elapsedTime); } } foreach (GroundChar character in ZoneManager.Instance.CurrentGround.IterateCharacters()) { if (character.EntEnabled) { character.Collide(); } } Loc focusedLoc = new Loc(); if (ZoneManager.Instance.CurrentGround.ViewCenter.HasValue) { focusedLoc = ZoneManager.Instance.CurrentGround.ViewCenter.Value; } else if (FocusedCharacter != null) { focusedLoc = FocusedCharacter.Bounds.Center + ZoneManager.Instance.CurrentGround.ViewOffset; } base.UpdateCamMod(elapsedTime, ref focusedLoc); UpdateCam(focusedLoc); base.Update(elapsedTime); } }
protected GroundAIUser(GroundAIUser other) : base(other) { }