private static void LoadEnemy(String entity, PlayableMainGameScreen PGS) { char[] delims = { '<', '>' }; String[] tokens = entity.Substring(8).Split(delims); String texture = tokens[1]; float posX = float.Parse(tokens[3]); float posY = float.Parse(tokens[5]); String filename = tokens[7]; EnemyEntity npEntity = new EnemyEntity(texture, new Vector2(posX, posY), filename); PGS.AddEntity(npEntity); }
public BattleScreen(String filename, EnemyEntity starter, GameScreen previous) { TransitionOnTime = TimeSpan.Zero; TransitionOffTime = TimeSpan.Zero; currentBattleState = BattleState.Starting; previousScreen = previous; creator = starter; battleFile = filename; }