コード例 #1
0
ファイル: BlockEventArgs.cs プロジェクト: KylerM/Skylight
 /// <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;
 }
コード例 #2
0
ファイル: Bot.cs プロジェクト: Jojatekok/Skylight
 /// <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;
 }
コード例 #3
0
ファイル: ChatEventArgs.cs プロジェクト: KylerM/Skylight
        /// <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;
        }
コード例 #4
0
ファイル: PlayerEventArgs.cs プロジェクト: Jojatekok/Skylight
 public PlayerEventArgs(Player subject, Room origin, Message rawMessage)
 {
     this.subject = subject;
     this.origin = origin;
     this.rawMessage = rawMessage;
 }
コード例 #5
0
ファイル: BlockEventArgs.cs プロジェクト: Jojatekok/Skylight
 public BlockEventArgs(Block b, Room origin)
 {
     this.origin = origin;
     this.placed = b;
     this.placer = b.Placer;
 }
コード例 #6
0
ファイル: RoomEventArgs.cs プロジェクト: KylerM/Skylight
 /// <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;
 }
コード例 #7
0
ファイル: ChatEventArgs.cs プロジェクト: Jojatekok/Skylight
 public ChatEventArgs(Player speaker, Room origin)
 {
     this.origin = origin;
     this.origin.ChatLog = origin.ChatLog;
     this.speaker = speaker;
 }
コード例 #8
0
ファイル: PlayerEventArgs.cs プロジェクト: KylerM/Skylight
 /// <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;
 }
コード例 #9
0
ファイル: Player.cs プロジェクト: KylerM/Skylight
 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;
 }
コード例 #10
0
ファイル: RoomEventArgs.cs プロジェクト: Jojatekok/Skylight
 public RoomEventArgs(Room changedRoom)
 {
     this.changedRoom = changedRoom;
 }