Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        public BattleScreen(String filename, EnemyEntity starter, GameScreen previous)
        {
            TransitionOnTime = TimeSpan.Zero;
            TransitionOffTime = TimeSpan.Zero;

            currentBattleState = BattleState.Starting;
            previousScreen = previous;

            creator = starter;
            battleFile = filename;
        }