Ejemplo n.º 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;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 5
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="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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 12
0
 public WorldBlock this[Layer layer, int x, int y]
 {
     get { return this._blocks[(int)layer, x, y]; }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 14
0
 public Point3D(Layer layer, int x, int y)
     : base(x, y)
 {
     this.Layer = layer;
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 16
0
 public void UploadBlock(Layer layer, int x, int y, Block block)
 {
     this.Events.Raise(this.GetBlock(layer, x, y, block));
 }