/// <summary> /// Constructor. /// </summary> /// <param name="game">Insatnce of base game</param> /// <param name="triggerPosition">this objects position</param> /// <param name="tilePostion">the destroyable tile's position</param> /// <param name="triggerTileType">path to this object's image file</param> /// <param name="destroyableTileType">path to the destroyable tile image file</param> public Trigger(Game game, Point triggerPosition, Point tilePostion, string triggerTileType, string destroyableTileType) : base(game, new Point(triggerPosition.X, triggerPosition.Y)) { collisionManager.RegisterObject(this); this.triggerTileType = triggerTileType; LoadContent(); destroyableTile = new DestroyableTile(game, tilePostion, destroyableTileType); }
/// <summary> /// Constructor. /// </summary> /// <param name="game">Insatnce of base game</param> /// <param name="triggerPosition">this objects position</param> /// <param name="tilePostion">the destroyable tile's position</param> /// <param name="triggerTileType">path to this object's image file</param> /// <param name="destroyableTileType">path to the destroyable tile image file</param> public Trigger(Game game, World world, Vector2 triggerPosition, Vector2 tilePostion, string triggerTileType, string destroyableTileType) : base(game, world, new Vector2(triggerPosition.X, triggerPosition.Y)) { this.triggerTileType = triggerTileType; destroyableTile = new DestroyableTile(game, world, tilePostion, destroyableTileType); }