示例#1
0
 private void Awake()
 {
     //Singleton
     if (Instance == null)
     {
         Instance = this;
     }
     else if (Instance != this)
     {
         Destroy(this);
     }
 }
示例#2
0
        public Ingredients Filter(IngredientChecker check)
        {
            Ingredients recipes = new Ingredients();

            foreach (Ingredient item in this)
            {
                if (check(item))
                {
                    recipes.Add(item);
                }
            }
            return(recipes);
        }
示例#3
0
 public IngredientCheckTests()
 {
     checker = new IngredientChecker();
 }