Beispiel #1
0
        public void CreatePlant(Plant.PlantType type, Vector2 pos)
        {
            switch (type)
            {
            case Plant.PlantType.kStrawBerryType:
                StrawberryPlant newPlant = new StrawberryPlant();
                newPlant.LoadContent("Art/" + newPlant.Name, Content);
                newPlant._Position = pos;
                _GatherableListActive.Add(newPlant);
                break;

            default:
                break;
            }
        }
Beispiel #2
0
        public Plant GetPlant(Plant.PlantType type)
        {
            StrawberryPlant p = (StrawberryPlant)FindPlant(Plant.PlantType.kStrawBerryType);

            return(p);
        }
Beispiel #3
0
 public Plant FindPlant(Plant.PlantType type)
 {
     return(PlantList.Find(x => x.MyPlantType == type));
 }