Пример #1
0
    // Start is called before the first frame update
    void Start()
    {
        // ------------------ Appliance Start Functions ------------------ //
        theSlicer.SlicerStart();
        theBlender.BlenderStart();
        theOrb.Start();
        theCatcher.Start();
        theCanon.Start();
        theVendor.Start();
        // --------------------------------------------------------------- //


        playerCamera = adjustablePlayerCamera;

        // Setting up item fabricator static values. //
        itemSpawnPoint = adjustableItemSpawnPoint;

        // Setting static value for water from inspector value. //
        water = adjustableWater;

        // Initialising things for the water tap. //
        currentWaterTapState = WaterTapState.EMPTY;



        // Ingredient spawner stuff. //
        ingredientSpawnTimer = 0;
        isSpawningIngredient = false;
    }
Пример #2
0
 /// <summary>
 /// CreateSoup() grabs a child gameObject from the AllSoups gameObject in the scene. It then uses data stored in the gameObjects SoupCreator script to make a Soup instance.
 /// </summary>
 /// <param name="soupFromScene"></param>
 public static void WaterTapSwitch()
 {
     if (currentWaterTapState == WaterTapState.EMPTY)
     {
         Debug.Log("Water tap switch activated.");
         Transform newWater = Object.Instantiate(water, water.position, water.rotation);
         newWater.gameObject.SetActive(true);
         currentWaterTapState = WaterTapState.OCCUPIED;
         SoundManager.PlaySound(newWater.GetComponent <AudioSource>());
     }
     else
     {
         Debug.Log("Could not activate water tap switch. There is already a water on the tap.");
     }
 }