Пример #1
0
 public BlockPlaceSendEvent(Layer layer, int x, int y, Block block)
 {
     this.Layer = BlockUtils.CorrectLayer(block, layer);
     this.X = x;
     this.Y = y;
     this.Block = block;
 }
Пример #2
0
 internal WorldBlock(MetadataPlatform metadataPlatform, Layer layer, int x, int y, Block block)
     : base(metadataPlatform)
 {
     this.Layer = layer;
     this.X = x;
     this.Y = y;
     this.SetBlock(block);
 }
Пример #3
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="RotatablePlaceSendEvent" /> class.
        /// </summary>
        /// <param name="layer">The layer.</param>
        /// <param name="x">The x-coordinate.</param>
        /// <param name="y">The y-coordinate.</param>
        /// <param name="block">The block.</param>
        /// <param name="rotation">The rotation.</param>
        public RotatablePlaceSendEvent(Layer layer, int x, int y, RotatableBlock block, uint rotation)
        {
            this.Block = block;
            this.X = x;
            this.Y = y;
            this.Layer = BlockUtils.CorrectLayer((Block)block, layer);

            this.Rotation = rotation;
        }
Пример #4
0
        public LabelPlaceSendEvent(Layer layer, int x, int y, LabelBlock block, string text)
        {
            this.Block = block;
            this.X = x;
            this.Y = y;
            this.Layer = BlockUtils.CorrectLayer((Block)block, layer);

            this.Text = text;
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="CoinDoorPlaceSendEvent" /> class.
        /// </summary>
        /// <param name="layer">The layer.</param>
        /// <param name="x">The x-coordinate.</param>
        /// <param name="y">The y-coordinate.</param>
        /// <param name="block">The block.</param>
        /// <param name="purpleId">The purple id.</param>
        public PurpleDoorPlaceSendEvent(Layer layer, int x, int y, PurpleDoorBlock block, uint purpleId)
        {
            this.Block = block;
            this.X = x;
            this.Y = y;
            this.Layer = BlockUtils.CorrectLayer((Block)block, layer);

            this.PurpleId = purpleId;
        }
Пример #6
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="CoinDoorPlaceSendEvent" /> class.
        /// </summary>
        /// <param name="layer">The layer.</param>
        /// <param name="x">The x-coordinate.</param>
        /// <param name="y">The y-coordinate.</param>
        /// <param name="block">The block.</param>
        /// <param name="coinsToCollect">The number of coins to collect.</param>
        public CoinDoorPlaceSendEvent(Layer layer, int x, int y, CoinDoorBlock block, uint coinsToCollect)
        {
            this.Block = block;
            this.X = x;
            this.Y = y;
            this.Layer = BlockUtils.CorrectLayer((Block)block, layer);

            this.CoinsToCollect = coinsToCollect;
        }
Пример #7
0
        public WorldPortalPlaceSendEvent(Layer layer, int x, int y, WorldPortalBlock block, string worldPortalTarget)
        {
            this.Block = block;
            this.X = x;
            this.Y = y;
            this.Layer = BlockUtils.CorrectLayer((Block)block, layer);

            this.WorldPortalTarget = worldPortalTarget;
        }
Пример #8
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="SoundPlaceSendEvent" /> class.
        /// </summary>
        /// <param name="layer">The layer.</param>
        /// <param name="x">The x-coordinate.</param>
        /// <param name="y">The y-coordinate.</param>
        /// <param name="block">The block.</param>
        /// <param name="soundId">The sound identifier.</param>
        public SoundPlaceSendEvent(Layer layer, int x, int y, SoundBlock block, uint soundId)
        {
            this.Block = block;
            this.X = x;
            this.Y = y;
            this.Layer = BlockUtils.CorrectLayer((Block)block, layer);

            this.SoundId = soundId;
        }
Пример #9
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="CoinDoorPlaceSendEvent" /> class.
        /// </summary>
        /// <param name="layer">The layer.</param>
        /// <param name="x">The x-coordinate.</param>
        /// <param name="y">The y-coordinate.</param>
        /// <param name="block">The block.</param>
        /// <param name="deathsRequired">The deaths required.</param>
        public DeathDoorPlaceSendEvent(Layer layer, int x, int y, DeathDoorBlock block, uint deathsRequired)
        {
            this.Block = block;
            this.X = x;
            this.Y = y;
            this.Layer = BlockUtils.CorrectLayer((Block)block, layer);

            this.DeathsRequired = deathsRequired;
        }
Пример #10
0
 public static Layer CorrectLayer(Block id, Layer layer)
 {
     if ((id > 0 && (int)id < 500) || id == Block.DecorLabel)
     {
         return Layer.Foreground;
     }
     if ((int)id >= 500 && (int)id < 1000)
     {
         return Layer.Background;
     }
     return layer;
 }
Пример #11
0
        public PortalPlaceSendEvent(Layer layer, int x, int y, PortalBlock block, uint portalId, uint portalTarget,
            PortalRotation portalRotation)
        {
            this.Block = block;
            this.X = x;
            this.Y = y;
            this.Layer = BlockUtils.CorrectLayer((Block)block, layer);

            this.PortalId = portalId;
            this.PortalTarget = portalTarget;
            this.PortalRotation = portalRotation;
        }
Пример #12
0
 public WorldBlock this[Layer layer, int x, int y]
 {
     get { return this._blocks[(int)layer, x, y]; }
 }
Пример #13
0
 private void NewBlock(WorldBlock[,,] blockArray, Layer layer, int x, int y, Block block)
 {
     blockArray[(int)layer, x, y] = new WorldBlock(this.MetadataPlatform, layer, x, y, block);
 }
Пример #14
0
 public Point3D(Layer layer, int x, int y)
     : base(x, y)
 {
     this.Layer = layer;
 }
Пример #15
0
 public UploadRequestEvent GetBlock(Layer layer, int x, int y, Block block)
 {
     var e = new BlockPlaceSendEvent(layer, x, y, block);
     return new UploadRequestEvent(e);
 }
Пример #16
0
 public void UploadBlock(Layer layer, int x, int y, Block block)
 {
     this.Events.Raise(this.GetBlock(layer, x, y, block));
 }