示例#1
0
        //-----------------------------------------------------------------------------
        // Constructor
        //-----------------------------------------------------------------------------
        public ItemCane()
        {
            this.id				= "item_cane";
            this.name			= new string[] { "Cane of Somaria" };
            this.description	= new string[] { "Used to create blocks." };
            this.maxLevel		= Item.Level1;
            this.flags			= ItemFlags.UsableInMinecart | ItemFlags.UsableWhileJumping | ItemFlags.UsableWhileInHole;
            this.sprite			= new Sprite[] { GameData.SPR_ITEM_ICON_CANE };

            this.somariaBlockTile		= null;
            this.somariaBlockTileData	= null;
        }
示例#2
0
        public override void OnAdded(Inventory inventory)
        {
            base.OnAdded(inventory);

            somariaBlockTile = null;

            // Create the somaria block tile data.
            somariaBlockTileData = new TileData(
                    typeof(TileSomariaBlock),
                    TileFlags.Movable |
                    TileFlags.Cuttable |
                    TileFlags.Bombable |
                    TileFlags.Boomerangable |
                    TileFlags.Pickupable |
                    TileFlags.InstantPickup);
            somariaBlockTileData.SolidType		= TileSolidType.Solid;
            somariaBlockTileData.CollisionModel	= GameData.MODEL_BLOCK;
            somariaBlockTileData.Sprite			= GameData.SPR_TILE_SOMARIA_BLOCK;
            somariaBlockTileData.BreakAnimation	= GameData.ANIM_EFFECT_SOMARIA_BLOCK_DESTROY;
            somariaBlockTileData.BreakSound		= GameData.SOUND_APPEAR_VANISH;
        }