示例#1
0
文件: Trophy.cs 项目: KylerM/Skylight
 /// <summary>
 /// Initializes a new instance of the <see cref="Trophy"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public Trophy(In @in)
 {
     this._in = @in;
 }
示例#2
0
文件: Access.cs 项目: KylerM/Skylight
 /// <summary>
 /// Initializes a new instance of the <see cref="Access"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public Access(In @in)
 {
     this._in = @in;
 }
示例#3
0
文件: Crown.cs 项目: KylerM/Skylight
 /// <summary>
 /// Initializes a new instance of the <see cref="Crown"/> class.
 /// </summary>
 /// <param name="in">The in.</param>
 public Crown(In @in)
 {
     _in = @in;
 }
示例#4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="NoteBlock"/> class.
 /// </summary>
 /// <param name="in">The in.</param>
 public NoteBlock(In @in)
 {
     this._in = @in;
 }
示例#5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ChatOld"/> class.
 /// </summary>
 /// <param name="in">The in.</param>
 public ChatOld(In @in)
 {
     _in = @in;
 }
示例#6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GodMode"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public GodMode(In @in)
 {
     this._in = @in;
 }
示例#7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Teleport"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public Teleport(In @in)
 {
     this._in = @in;
 }
示例#8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CoinObject"/> class.
 /// </summary>
 /// <param name="in">The in.</param>
 public CoinObject(In @in)
 {
     this._in = @in;
 }
示例#9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="GiveWizard2"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public GiveWizard2(In @in)
 {
     this._in = @in;
 }
示例#10
0
文件: Bot.cs 项目: Jojatekok/Skylight
        public void Join()
        {
            if (!this.IsConnected)
            {
                // Log in
                this.LogIn();

                // If you didn't connect, it must have failed.
                if (!this.IsConnected)
                {
                    return;
                }
            }

            // Parse the level ID (because some people like to put full URLs in).
            this.R.Id = Tools.ParseURL(this.R.Id);

            try
            {
                // Join room
                this.Connection = this.Client.Multiplayer.JoinRoom(this.R.Id, new Dictionary<string, string>());

                // Update room data
                Room.JoinedRooms.Add(this.R);

                // Everyone gets a connection.
                this.R.Connections.Add(this.Connection);

                // The following 25 lines deal with filtering messages from the client.
                // Every bot receives info from the room, because some of it is exclusive to the bot.
                // We call those "personal" pulls.
                // They are exactly the same as the main pull, except In.IsPersonal = true.
                In i = new In();
                i.IsPersonal = true;
                i.Source = this.R;
                i.Bot = this;
                this.Connection.OnMessage += i.OnMessage;
                this.R.Pulls.Add(i);

                // However, everything else only needs one bot to handle. Things like chat and movement.
                // We don't need five bots firing an event every time someone chats.
                if (!this.R.HasPull)
                {
                    this.R.HasPull = true;

                    this.R.Receiver = this;

                    this.Connection.OnMessage += this.R.Pull.OnMessage;
                    this.R.Pull.IsPersonal = false;
                    this.R.Pull.Bot = this;
                    this.R.Pull.Source = this.R;
                }

                // Once everything is internal settled, send the init.
                this.Connection.Send("init");
                this.Connection.Send("init2");

                this.R.OnlinePlayers.Add(this);

                // Delay a couple seconds so that the bot has time to join.
                Thread.Sleep(2000);

                Tools.SkylightMessage("Joined room.");
            }
            catch (Exception e)
            {
                Tools.SkylightMessage("Unable to join room \"" + this.R.Id + "\": " + e.Message);

                return;
            }
        }
示例#11
0
文件: Meta.cs 项目: KylerM/Skylight
 /// <summary>
 /// Initializes a new instance of the <see cref="Meta"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public Meta(In @in)
 {
     this._in = @in;
 }
示例#12
0
文件: Wizard.cs 项目: KylerM/Skylight
 /// <summary>
 /// Initializes a new instance of the <see cref="Wizard"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public Wizard(In @in)
 {
     this._in = @in;
 }
示例#13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AddSpecialBlock"/> class.
 /// </summary>
 /// <param name="in">The in.</param>
 public AddSpecialBlock(In @in)
 {
     this._in = @in;
 }
示例#14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Autotext"/> class.
 /// </summary>
 /// <param name="in">The in.</param>
 public Autotext(In @in)
 {
     _in = @in;
 }
示例#15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ResetWorld"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public ResetWorld(In @in)
 {
     this._in = @in;
 }
示例#16
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LeftWorld"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public LeftWorld(In @in)
 {
     this._in = @in;
 }
示例#17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LevelChange"/> class.
 /// </summary>
 /// <param name="in">
 /// The in.
 /// </param>
 public LevelChange(In @in)
 {
     this._in = @in;
 }