-
Notifications
You must be signed in to change notification settings - Fork 1
/
Oasis.cs
49 lines (29 loc) · 1.04 KB
/
Oasis.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
using UnityEngine;
using System.Collections;
public class Oasis : Event
{
public const int numbersThatWinMoreWater = 3;
public const int waterGranted = 3;
const string foundOasisMessage = "Is it an oasis, or a mirage?...";
const string isOasisMessage = "It is an oasis! You earn more water.";
const string isMirageMessage = "It is a mirage. You earn nothing...";
bool getMoreWater = false;
public override void activateEvent (GameObject desertExplorer)
{
initializeEvent ();
getMoreWater = drawFromBagOfChance (numbersThatWinMoreWater);
explorer = desertExplorer;
}
void Update ()
{
if (effectOccurring) {
displayResultOfTwoCaseEvent (getMoreWater, foundOasisMessage, isOasisMessage, isMirageMessage);
} else if (inControlOfTextBox) {
closeEvent ();
}
}
protected override void takeEffect ()
{
explorer.GetComponent<Meeple> ().player.GetComponent<PlayerInventory> ().changeAvailableWaterDuringMovement (waterGranted);
}
}