/// <summary> /// Initializes a new instance of the <see cref="BlockEventArgs"/> class. /// Initializes a new instance of the <see cref="BlockEventArgs"/>. Send a block changed event. /// </summary> /// <param name="b"> /// The block /// </param> /// <param name="m"> /// The raw message. /// </param> /// <param name="origin"> /// The room where the block originated from. /// </param> internal BlockEventArgs(Block b, Message m, Room origin = null) { Origin = origin ?? Bot.CurrentRoom; this.placed = b; this.placer = b.Placer; RawMessage = m; }
/// <param name="password">Make this field null if it isn't needed for your log-in method.</param> public Bot(Room r, string emailOrToken = Tools.GuestEmail, string passwordOrToken = Tools.GuestPassword, AccountType accType = AccountType.Regular) { this.emailOrToken = emailOrToken; this.passwordOrToken = passwordOrToken; this.R = r; this.accType = accType; }
/// <summary> /// Initializes a new instance of the <see cref="ChatEventArgs"/> class. /// The main method where the chat messages are sent. This method sets the properties in /// this class to the speaker and origin of the message, where it is handed off to a delegate /// later. /// </summary> /// <param name="speaker"> /// The player who said the message. /// </param> /// <param name="origin"> /// The room where the message originated. /// </param> internal ChatEventArgs(Player speaker, Message m, Room origin, string message) { this.origin = origin; if (this.Origin != null) { this.Origin.ChatLog = origin.ChatLog; } this.speaker = speaker; this.message = message; RawMessage = m; }
public PlayerEventArgs(Player subject, Room origin, Message rawMessage) { this.subject = subject; this.origin = origin; this.rawMessage = rawMessage; }
public BlockEventArgs(Block b, Room origin) { this.origin = origin; this.placed = b; this.placer = b.Placer; }
/// <summary> /// Initializes a new instance of the <see cref="RoomEventArgs" /> class. /// </summary> /// <param name="changedRoom">The changed room.</param> internal RoomEventArgs(Room changedRoom, Message m = null) { this.changedRoom = changedRoom; RawMessage = m; }
public ChatEventArgs(Player speaker, Room origin) { this.origin = origin; this.origin.ChatLog = origin.ChatLog; this.speaker = speaker; }
/// <summary> /// Initializes a new instance of the <see cref="PlayerEventArgs"/> class. /// The main constructor method. /// </summary> /// <param name="subject"> /// The player /// </param> /// <param name="origin"> /// The room where the player is originating in. /// </param> /// <param name="rawMessage"> /// The raw, unparsed message from the server (concerning player). /// </param> internal PlayerEventArgs(Player subject, Room origin, Message rawMessage) { this.Subject = subject; this.Origin = origin; this.RawMessage = rawMessage; }
public Player(Room room, int id, string name, int smiley, double xPos, double yPos, bool isGod, bool isMod, bool hasChat, int coins, bool purple, bool isFriend, int level) { this.PlayingIn = room; this.Smiley = smiley; this.IsGod = isGod; this.IsMod = isMod; this.Id = id; this.hasChat = hasChat; this.Coins = coins; this.purple = purple; this.isFriend = isFriend; this.Level = level; this.rect2 = new Rectangle(0, 0, 16, 26); this.queue = new Queue<int>(Config.physics_queue_length); this.lastJump = new DateTime(); this.lastPortal = new Point(); this.that = this as Player; this.modrect = new Rectangle(0, 0, 64, 64); this.clubrect = new Rectangle(0, 0, 64, 64); this._currentThrust = this._maxThrust; this.X = xPos; this.Y = yPos; this.isme = false; this.Name = name; size = 16; width = 16; height = 16; this._baseDragX = Config.physics_base_drag; this._baseDragY = Config.physics_base_drag; this._no_modifier_dragX = Config.physics_no_modifier_drag; this._no_modifier_dragY = Config.physics_no_modifier_drag; this._water_drag = Config.physics_water_drag; this._water_buoyancy = Config.physics_water_buoyancy; this._mud_drag = Config.physics_mud_drag; this._mud_buoyancy = Config.physics_mud_buoyancy; this._boost = Config.physics_boost; this._gravity = Config.physics_gravity; this.mult = Config.physics_variable_multiplyer; this.last = DateTime.Now; return; }
public RoomEventArgs(Room changedRoom) { this.changedRoom = changedRoom; }