Ejemplo n.º 1
0
  public static final void loadBuildingEnemiesData(Context c) {
    Properties props = DataStore.loadResources(c, ResourceUtil.getRID(R.raw.class, "bd_enemies"));

    Set<Object> keys = props.keySet();

    for (Object key : keys) {
      // Log.e("TTTT","TTTT key: " + key);
      String bd_id_lane[] = key.toString().split("-");
      if (bd_id_lane.length != 2) continue;

      String bd_id = bd_id_lane[0];
      int lane = Integer.parseInt(bd_id_lane[1]);

      String value = props.getProperty(key.toString());

      BuildingEnemiesData bed = new BuildingEnemiesData(bd_id, value);

      BuildingEnemiesData[] bd_enemies = buildingEnemiesDataMap.get(bd_id);
      if (bd_enemies == null) {
        bd_enemies = new BuildingEnemiesData[5];
        buildingEnemiesDataMap.put(bd_id, bd_enemies);
      }
      bd_enemies[lane] = bed;
    }
  }
Ejemplo n.º 2
0
  public static final void loadEnemyData(Context c) {
    Properties props = DataStore.loadResources(c, ResourceUtil.getRID(R.raw.class, "enemy_data"));

    Set<Object> keys = props.keySet();

    for (Object key : keys) {
      String value = props.getProperty(key.toString());

      heroDataMap.put(key.toString(), new EnemyData(key.toString(), value));
    }
  }
Ejemplo n.º 3
0
  public static final void loadCharacterSpriteData(Context c) {
    Properties props =
        DataStore.loadResources(c, ResourceUtil.getRID(R.raw.class, "char_sprite_data"));

    Set<Object> keys = props.keySet();

    for (Object key : keys) {
      String value = props.getProperty(key.toString());

      charSpriteDataMap.put(key.toString(), new CharacterSpriteData(key.toString(), value));
    }
  }