Beispiel #1
0
        public EntityStatic(EntityMobile actor)
        {
            Type = actor.Type;

            Direction = actor.Direction.Current;
            Flags     = actor.Flags;
        }
Beispiel #2
0
        public void MoveDelay(EntityMobile actor, ushort duration)
        {
            if (actor.IsMoving)
            {
                return;
            }

            actor.Timer.Start(duration, false);
        }
        public EntityMobile(EntityMobile other)
        {
            this.Type = other.Type;

            this.Position  = other.Position;
            this.Direction = other.Direction;

            this.Flags = other.Flags;
            this.Timer = other.Timer;
        }
Beispiel #4
0
        public void MoveFacing(EntityMobile actor, ushort duration, Direction direction)
        {
            if (actor.IsMoving)
            {
                return;
            }

            actor.Position.Next  = actor.Position.Current;
            actor.Direction.Next = direction;
            actor.Timer.Start(duration, false);
        }
Beispiel #5
0
        public void MoveCancel(EntityMobile actor)
        {
            if (!actor.IsMoving)
            {
                return;
            }

            actor.Position.Next  = actor.Position.Current;
            actor.Direction.Next = actor.Direction.Current;
            actor.Timer.Reset();
        }
Beispiel #6
0
 public void MoveDown(EntityMobile actor, ushort duration)
 {
     Move(actor, actor.Position.Current.Down, Direction.LEFT, duration);
 }
Beispiel #7
0
 public void MoveRight(EntityMobile actor, ushort duration)
 {
     Move(actor, actor.Position.Current.Right, Direction.LEFT, duration);
 }