// Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         TickScript.onTurnTick();
     }
 }
Esempio n. 2
0
    // Update is called once per frame
    void Update()
    {
        if (Input.GetKeyDown(KeyCode.R))
        {
            Tut_Potion_controls.makePotion(InventoryController.colourNames.Red);
        }

        if (Input.GetKeyDown(KeyCode.B))
        {
            Tut_Potion_controls.makePotion(InventoryController.colourNames.Blue);
        }

        if (Input.GetKeyDown(KeyCode.Y))
        {
            Tut_Potion_controls.makePotion(InventoryController.colourNames.Yellow);
        }

        if (Input.GetKeyDown(KeyCode.G))
        {
            Tut_Potion_controls.makePotion(InventoryController.colourNames.Green);
        }

        if (Input.GetKeyDown(KeyCode.Space))
        {
            turnTick.onTurnTick();
        }
    }
 //  checks the two selected cards and returns true if they are the same colour
 private bool CardsAreSame()
 {
     if (clickedCards[0].thisMaterial.name != clickedCards[1].thisMaterial.name)
     {
         turnTick.onTurnTick();
         return(false);
     }
     else
     {
         throwPotion();
         clickedCards.Clear();
         pairsMade++;
         return(true);
     }
 }
Esempio n. 4
0
 public void addACard(colourNames colour)
 {
     Inven_Lookup[colour].number += 1;
     updateCardNumbers();
     turnTick_funcs.onTurnTick();
 }