Example #1
0
        public override void Update(FrameTick elapsedTime)
        {
            if (ZoneManager.Instance.CurrentGround != null)
            {
                //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();
                    }
                }

                //Make entities think!
                foreach (GroundEntity ent in ZoneManager.Instance.CurrentGround.IterateEntities())
                {
                    if (ent.EntEnabled && ent.GetType().IsSubclassOf(typeof(BaseTaskUser)))
                    {
                        BaseTaskUser tu = (BaseTaskUser)ent;
                        tu.Think();
                    }
                }


                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);
            }
        }
Example #2
0
 protected BaseTaskUser(BaseTaskUser other) : base(other)
 {
 }