Package ch.fusun.baron.unit.ui

Source Code of ch.fusun.baron.unit.ui.UnitDynastyTileChild

package ch.fusun.baron.unit.ui;

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

/**
* The flag for a unit
*/
public class UnitDynastyTileChild implements TileChild<Dynasty> {
  private final Dynasty dynasty;

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

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

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

Related Classes of ch.fusun.baron.unit.ui.UnitDynastyTileChild

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.