public CreateButton(string _txt, string _assetName, Rectangle _rect, Game1.Animals _type, Game1 _game1) { this.txt = _txt; this.assetName = _assetName; this.rect = _rect; this.type = _type; _game1.buttonList.Add(this); this.game1 = _game1; }
public ActionButton(string _txt, string _assetName, Rectangle _rect, Game1.Actions _actionType, Game1 _game1, IOption<Animal> _animal) { this.txt = _txt; this.assetName = _assetName; this.rect = _rect; this.actionType = _actionType; this.animal = _animal; _game1.buttonList.Add(this); this.game1 = _game1; }
public IOption<Animal> Create(Game1.Animals animalType) { switch (animalType) { case Game1.Animals.Cat: return new Some<Animal>(new Cat()); case Game1.Animals.Dog: return new Some<Animal>(new Dog()); case Game1.Animals.Tiger: return new Some<Animal>(new Tiger()); case Game1.Animals.Pizza: return new Some<Animal>(new Pizza()); default: return new None<Animal>(); } }