private void HandleObstructionBlockCollision(ObstructionBlock collidingObstructionBlock) { if ((_activePowerUp == Definitions.PowerUp.Boots) && (collidingObstructionBlock is SpikeBlock)) { HandleSolidBlockCollision(collidingObstructionBlock); } else { StartDeathSequence(); } }
private ObstructionBlock CreateObstructionBlock(XElement node) { ObstructionBlock newBlock = new ObstructionBlock(); newBlock.WorldPosition = new Vector2((float)node.Attribute("x"), (float)node.Attribute("y")); newBlock.Texture = TextureManager.Textures[node.Attribute("texture").Value]; return newBlock; }
private ObstructionBlock CreateObstructionBlock(string textureName) { ObstructionBlock newBlock = new ObstructionBlock(); newBlock.TextureReference = textureName; return newBlock; }