SetDefaults() private method

private SetDefaults ( int type ) : void
type int
return void
Example #1
0
 public static void NewTemporaryAnimation(int type, ushort tileType, int x, int y)
 {
     Point16 point16 = new Point16(x, y);
     if (x < 0 || x >= Main.maxTilesX || (y < 0 || y >= Main.maxTilesY))
         return;
     Animation animation = new Animation();
     animation.SetDefaults(type);
     animation._tileType = tileType;
     animation._coordinates = point16;
     animation._temporary = true;
     _awaitingAddition.Add(animation);
     if (Main.netMode != 2)
         return;
     NetMessage.SendTemporaryAnimation(-1, type, tileType, x, y);
 }
Example #2
0
        public static void NewTemporaryAnimation(int type, ushort tileType, int x, int y)
        {
            Point16 coordinates = new Point16(x, y);

            if (x >= 0 && x < Main.maxTilesX && y >= 0 && y < Main.maxTilesY)
            {
                Animation animation = new Animation();
                animation.SetDefaults(type);
                animation._tileType    = tileType;
                animation._coordinates = coordinates;
                animation._temporary   = true;
                _awaitingAddition.Add(animation);
                if (Main.netMode == 2)
                {
                    NetMessage.SendTemporaryAnimation(-1, type, tileType, x, y);
                }
            }
        }
Example #3
0
        public static void NewTemporaryAnimation(int type, ushort tileType, int x, int y)
        {
            Point16 point16 = new Point16(x, y);

            if (x < 0 || x >= Main.maxTilesX || y < 0 || y >= Main.maxTilesY)
            {
                return;
            }
            Animation animation = new Animation();

            animation.SetDefaults(type);
            animation._tileType    = tileType;
            animation._coordinates = point16;
            animation._temporary   = true;
            Animation._awaitingAddition.Add(animation);
            if (Main.netMode == 2)
            {
                NetMessage.SendTemporaryAnimation(-1, type, (int)tileType, x, y);
            }
        }