public void Destroy() { collisionOffset = new Vector2(-20, -10); isKenematic = false; renderer.animNum = 1; renderer.ForceUpdate(); ForceCollisionBoxUpdate(); collisionBox.Width = 50; collisionBox.Height = 50; o_block[] blocks = IntersectBoxAll <o_block>(new Vector2(0, 0)); o_plcharacter play = IntersectBox <o_plcharacter>(new Vector2(0, 0)); if (blocks != null) { if (play != null) { if (parent != null) { parent.bomb_ItemToFocusOn = null; } TPPlayer(ref play); //Game1.RemoveObject(play); //Game1.game.ResetLevel(); return; } for (int i = 0; i < blocks.Length; i++) { s_object bl = blocks[i]; o_block blok = bl.GetComponent <o_block>(); if (blok.TYPEOFBLOCK == o_block.BLOCK_TYPE.BREAKABLE) { Game1.game.ChangeTile(bl.position, blok.TileNum); Game1.RemoveObject(bl); } } } if (parent != null) { parent.bomb_ItemToFocusOn = null; } }
public s_spriterend(s_object _host) { blank = Game1.blank; colour = Color.White; host = _host; }