/// <summary> /// Create a tile type. /// </summary> /// <param name="maxspeed"> /// Maximum Speed <see cref="System.Single"/> /// </param> /// <param name="acceleration"> /// acceleration rate <see cref="System.Single"/> /// </param> /// <param name="deceleration"> /// breaking rate <see cref="System.Single"/> /// </param> public TileType(Sprite tileImage) { image = tileImage; protoType = new Tile(this); }
/// <summary> /// Create a new unit type /// </summary> /// <param name="weps"> /// The weapons <see cref="List<WeaponType>"/> /// </param> /// <param name="a"> /// The armor <see cref="ArmorType"/> /// </param> /// <param name="e"> /// the engine <see cref="EngineType"/> /// </param> public UnitType(WeaponType wep, ArmorType a, EngineType e, Sprite s) { init(wep, a, e, s); }
private void init(WeaponType wep, ArmorType a, EngineType e, Sprite s) { weapon = wep; armor = a; engine = e; image = s; protoType = new Unit(this); }
public UnitType(string wep, string a, string e, Sprite s) { init((WeaponType)GameObjectFactory.The.getType(wep), (ArmorType)GameObjectFactory.The.getType(a), (EngineType)GameObjectFactory.The.getType(e), s); }
/// <summary> /// Constructor. /// </summary> /// <param name="name">Name of the button. For AddButton it should always be "add"</param> /// <param name="image">Sprite for displaying the button.</param> /// <param name="x">Possition in the x dimention.</param> /// <param name="y">Possition in the y dimention.</param> /// <param name="type">String identifying the UnitType.</param> public AddButton(String name, Sprite image, int x, int y, String type) : base("add", image, x, y) { _type = type; }