Exemple #1
0
    // Called by RunePlacement (with deleting a rune) or gem pickups (PickupRune)
    public void PickedUpRune(Rune.RuneType type)
    {
        if (type == Rune.RuneType.AIR)
        {
            airNum++;
            UpdateButton(airBtn, airCountTxt, airNum);
            // If was out of runes, select this type
            if (noneToPlace)
            {
                noneToPlace = false;
                rp.UpdateRuneAvailability(false);
                SelectAir();
            }
        }
        if (type == Rune.RuneType.WATER)
        {
            waterNum++;
            UpdateButton(waterBtn, waterCountTxt, waterNum);
            // If was out of runes, select this type
            if (noneToPlace)
            {
                noneToPlace = false;
                rp.UpdateRuneAvailability(false);
                SelectWater();
            }
        }
        if (type == Rune.RuneType.FIRE)
        {
            fireNum++;
            UpdateButton(fireBtn, fireCountTxt, fireNum);
            // If was out of runes, select this type
            if (noneToPlace)
            {
                noneToPlace = false;
                rp.UpdateRuneAvailability(false);
                SelectFire();
            }
        }

        // If didn't pick up in placement mode, show the UI briefly
        if (rp.canPlace != true)
        {
            StartCoroutine(PopupUI());
        }
    }
Exemple #2
0
 // Called when the fire button is clicked
 public void SelectFire()
 {
     rp.UpdateRuneType("Prefabs/Runes/FireRune", "Prefabs/PlacedRuneTiles/FireRuneTile", fireS);
     currSelected = Rune.RuneType.FIRE;
 }
Exemple #3
0
 // Called when the water button is clicked
 public void SelectWater()
 {
     rp.UpdateRuneType("Prefabs/Runes/WaterRune", "Prefabs/PlacedRuneTiles/WaterRuneTile", waterS);
     currSelected = Rune.RuneType.WATER;
 }
Exemple #4
0
 // Called when the air button is clicked
 public void SelectAir()
 {
     rp.UpdateRuneType("Prefabs/Runes/AirRune", "Prefabs/PlacedRuneTiles/AirRuneTile", airS);
     currSelected = Rune.RuneType.AIR;
 }