Пример #1
0
 public static bool MessageToOld(GameTime gameTime, Message message, int milliseconds)
 {
     if (message.timer != TimeSpan.Zero)
     {
         float difference = (float)gameTime.TotalGameTime.TotalMilliseconds - (float)message.timer.TotalMilliseconds;
         if (difference > milliseconds)
         {
             return true;
         }
     }
     return false;
 }
Пример #2
0
        public int CompareTo(Message message)
        {
            if (Type.Equals(message.Type) == false)
                return -1;

            if (message.Sender != null && Sender != null)
            {
                if (Sender.Equals(message.Sender) == false)
                    return -1;
            }
            else if ((message.Sender == null && Sender != null) || (message.Sender != null && Sender == null))
                return -1;

            if (message.Destination != null && Destination != null)
            {
                if (Destination.Equals(message.Destination) == false)
                    return -1;
            }
            else if ((message.Destination == null && Destination != null) || (message.Destination != null && Destination == null))
                return -1;

            return 0;
        }
Пример #3
0
 public static void CreateMessage(Message message)
 {
     if(!currentFrame_messages.Contains(message))
         currentFrame_messages.Add(message);
 }
Пример #4
0
        private void EndMove(Message _msg)
        {
            destinyPoints = null;
            destinyPointer = null;

            direction.X = 0.0f;
            direction.Z = 0.0f;

            _msg.Done = true;

            setIdle();
        }