ArenaEntity.java 文件源码

java
阅读 25 收藏 0 点赞 0 评论 0

项目:BlockBall 作者:
ArenaEntity(Map<String, Object> items, List<String> wallBouncing) throws Exception {
    super();
    this.setName(String.valueOf(items.get("id")));
    this.setCornerLocations(new SLocation(((MemorySection) items.get("corner-1")).getValues(true)).toLocation(), new SLocation(((MemorySection) items.get("corner-2")).getValues(true)).toLocation());
    this.alias = (String) items.get("name");
    this.isEnabled = (boolean) items.get("enabled");
    this.gameType = GameType.getGameTypeFromName((String) items.get("gamemode"));
    this.redGoal = new GoalEntity(((MemorySection) items.get("goals.red")).getValues(true));
    this.blueGoal = new GoalEntity(((MemorySection) items.get("goals.blue")).getValues(true));
    this.ballSpawnLocation = new SLocation(((MemorySection) items.get("ball.spawn")).getValues(true));
    this.properties = new BallMetaEntity(((MemorySection) items.get("ball.properties")).getValues(true));
    this.lobbyMetaEntity = new LobbyMetaEntity(((MemorySection) items.get("lobby")).getValues(true));
    if (items.get("event") != null)
        this.properties3 = new EventMetaEntity(((MemorySection) items.get("event")).getValues(true));

    final Map<String, Object> data = ((MemorySection) items.get("properties")).getValues(true);
    this.properties2 = new TeamMetaEntity(data);

    this.bounce_types = new ArrayList<>(wallBouncing);
    if (data.containsKey("boost-items"))
        this.boostItemHandler = new ItemSpawner(((MemorySection) data.get("boost-items")).getValues(true));
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号