-
Notifications
You must be signed in to change notification settings - Fork 0
/
blankanima
60 lines (58 loc) · 1.71 KB
/
blankanima
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
50
51
52
53
54
55
56
57
58
59
60
#pragma strict
var playerObject : GameObject;
var animalName : String = "@@";
var normalSprite : Sprite;
var angrySprite : Sprite;
var blushSprite : Sprite;
var costumeSprite : Sprite;
var animalBackground : Sprite;
var choice : int;
var promptStyle : GUIStyle;
var promptX : float;
var prompt1Y : float;
var prompt2Y : float;
var prompt3Y : float;
var promptW : float;
var promptH : float;
function Start () {
playerObject = GameObject.Find("PlayerObject");
GetComponent(date).dateSprite = normalSprite;
GetComponent(date).bkgSprite = animalBackground;
promptStyle = GetComponent(date).promptStyle;
}
function OnGUI() {
if (playerObject.GetComponent(player).level@@ == 0){
if (GetComponent(date).pos == 0){
GetComponent(date).dateSprite = normalSprite;
GetComponent(date).vocal = "";
GetComponent(date).action = false;
}
if (GetComponent(date).pos == 2) {
GetComponent(date).vocal = "> ";
GetComponent(date).action = true;
GetComponent(date).prompt = true;
if (GUI.Button(Rect(promptX,prompt1Y,promptW,promptH),"Yes",promptStyle)){
GetComponent(date).pos++;
GetComponent(date).prompt = false;
}
if (GUI.Button(Rect(promptX,prompt2Y,promptW,promptH),"No",promptStyle)){
GetComponent(date).prompt = false;
Application.LoadLevel ("map");
}
}
}
}
} else if (playerObject.GetComponent(player).level@@ == 1){
if (GetComponent(date).pos == 1) {
GetComponent(date).vocal = "";
}
}
}
function Update () {
promptW = GetComponent(date).promptW;
promptH = GetComponent(date).promptH;
promptX = GetComponent(date).promptX;
prompt1Y = GetComponent(date).prompt1Y;
prompt2Y = prompt1Y + GetComponent(date).promptGap + promptH;
prompt3Y = prompt2Y + GetComponent(date).promptGap + promptH;
}