示例#1
0
 /// <summary>
 /// Clears this instance.
 /// </summary>
 public void Clear()
 {
     Spec      = -1;
     dir       = -1;
     pose      = -1;
     gender    = -1;
     DS_Number = -1;
     Wings     = -1;
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Furre"/> class.
 /// </summary>
 public Furre()
 {
     colorString  = new ColorString();
     location     = new FurrePosition();
     LastPosition = new FurrePosition();
     lastStat     = -1;
     name         = "Unknown";
     iD           = -1;
 }
示例#3
0
 /// <summary>
 /// Remove Avatar from the Dream Furre List by its Furre ID
 /// </summary>
 /// <param name="ServerInstruction">
 /// </param>
 public RemoveAvatar(string ServerInstruction) : base(ServerInstruction)
 {
     if (ServerInstruction[0] == ')')
     {
         base.instructionType = ServerInstructionType.RemoveAvatar;
     }
     if (ServerInstruction.Length > 4)
     {
         FurreId = ServerInstruction.Substring(1, 4);
     }
 }
 /// <summary>
 /// Removes a Furre based on their Furre ID
 /// </summary>
 /// <param name="FurreID">
 /// </param>
 public bool Remove(Base220 FurreID)
 {
     lock (ListLock)
     {
         Furre fur = null;
         foreach (Furre Fur in this)
         {
             if (Fur.FurreID == FurreID)
             {
                 fur = Fur;
                 break;
             }
         }
         return(this.Remove(fur));
     }
 }
        /// <summary>
        /// Get's a Furre from the Dream List bu it's ID
        /// </summary>
        /// <param name="FurreID">
        /// Base220 4 byte string representing the Furre ID
        /// </param>
        /// <returns>
        /// </returns>
        public Furre GetFurreByID(Base220 FurreID)
        {
            var fur = new Furre(FurreID);

            lock (ListLock)
            {
                foreach (Furre Furre in this)
                {
                    if (Furre.FurreID == FurreID)
                    {
                        fur = Furre;
                    }
                }
            }
            return(fur);
        }
        /// <summary>
        /// Determines whether [contains] [the specified furre identifier].
        /// </summary>
        /// <param name="FurreId">The furre identifier.</param>
        /// <returns>
        ///   <c>true</c> if [contains] [the specified furre identifier]; otherwise, <c>false</c>.
        /// </returns>
        public bool Contains(Base220 FurreId)
        {
            var found = false;

            lock (ListLock)
            {
                foreach (Furre fur in this)
                {
                    if (fur.FurreID == FurreId)
                    {
                        found = true;
                        break;
                    }
                }
            }
            return(found);
        }
        /// <summary>
        /// Initialize from center point usually a furre position
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        public void SetPosition(Base220 x, Base220 y)
        {
            furreLocation = new FurrePosition(x, y);
            int XoddOffset = 2;
            int YoddOffset = 0;

            if (IsOdd(furreLocation.Y))
            {
                XoddOffset = 0;
                YoddOffset = 1;
            }
            StartLocation = new FurrePosition()
            {
                X = furreLocation.X - 8 + XoddOffset,
                Y = furreLocation.Y - 8 - 1
            };

            EndLocation = new FurrePosition()
            {
                X = FurreLocation.X + 14,
                Y = FurreLocation.Y + 17 + YoddOffset
            };
        }
 /// <summary>
 ///
 /// </summary>
 /// <param name="x"></param>
 /// <param name="y"></param>
 public ViewArea(Base220 x, Base220 y)
 {
     SetPosition(x, y);
 }
示例#9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Furre"/> class.
 /// </summary>
 /// <param name="FurreID">The furre identifier.</param>
 /// <param name="Name">The name.</param>
 public Furre(Base220 FurreID, string Name) : this()
 {
     iD   = FurreID;
     name = Name;
 }
示例#10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Furre"/> class.
 /// </summary>
 /// <param name="FurreID">The furre identifier.</param>
 public Furre(Base220 FurreID) : this()
 {
     iD = FurreID;
 }
示例#11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="FurrePosition"/> class.
 /// </summary>
 /// <param name="X">The x coordinate.</param>
 /// <param name="Y">The y coordinate.</param>
 public FurrePosition(Base220 X, Base220 Y)
 {
     this.Y = Y;
     this.X = X;
 }
示例#12
0
 /// <summary>
 /// Determines whether the specified value is odd.
 /// </summary>
 /// <param name="value">The value.</param>
 /// <returns>
 ///   <c>true</c> if the specified value is odd; otherwise, <c>false</c>.
 /// </returns>
 public static bool IsOdd(Base220 value)
 {
     return(value % 2 != 0);
 }