private Obstacle createQuickCopy(Obstacle cachedObstacle) { ObstacleSprite sprite = cachedObstacle.MySprite.copy(); // create a new instance of this player Obstacle obstacle = new Obstacle(this.lhg, cachedObstacle.MyReferenceName, cachedObstacle.MyDisplayName, sprite); return(obstacle); }
private Obstacle loadObstacle(XmlNode obstacleNode, StaticSpriteSheet spriteSheet) { string referenceName = obstacleNode.Attributes["referenceName"].Value; string displayName = obstacleNode.Attributes["displayName"].Value; Texture2D texture = spriteSheet.getTexture(referenceName); ObstacleSprite sprite = new ObstacleSprite(lhg, texture); Obstacle obstacle = new Obstacle(lhg, referenceName, displayName, sprite); return(obstacle); }
public Obstacle(LunchHourGames lhg, String referenceName, String displayName, ObstacleSprite sprite) : base(lhg, EntityType.Obstacle, referenceName, displayName) { this.referenceName = referenceName; this.sprite = sprite; }
private CombatLocation loadCombatLocation(CombatBoard board, XmlNode locationNode, ObstacleSprite sprite) { CombatLocation location = null; try { int row = Convert.ToInt16(locationNode.Attributes["row"].Value); int col = Convert.ToInt16(locationNode.Attributes["col"].Value); location = new CombatLocation(board, row, col); } catch (Exception ex) { } return(location); }