Package ch.fusun.baron.city.ui

Source Code of ch.fusun.baron.city.ui.CityDynastyTileChild

package ch.fusun.baron.city.ui;

import ch.fusun.baron.map.ui.gef.editpart.TileChild;
import ch.fusun.baron.player.Dynasty;
import ch.fusun.baron.swt.isometry.components.Sprite;

/**
* Flag for the city
*/
public class CityDynastyTileChild implements TileChild<Dynasty> {

  private final Dynasty dynasty;

  /**
   * @param dynasty
   *            The dynasty for coat of arms
   */
  public CityDynastyTileChild(Dynasty dynasty) {
    this.dynasty = dynasty;
  }

  @Override
  public Dynasty getModel() {
    return dynasty;
  }

  @Override
  public Sprite getSprite() {
    return new Sprite(Activator.getImageForDynasty(dynasty), null, 21);

  }
}
TOP

Related Classes of ch.fusun.baron.city.ui.CityDynastyTileChild

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.