-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNPCText.cs
More file actions
71 lines (51 loc) · 1.78 KB
/
NPCText.cs
File metadata and controls
71 lines (51 loc) · 1.78 KB
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
61
62
63
64
65
66
67
68
69
70
using Godot;
namespace TSAVideoGame
{
public class NPCText : Label
{
public static int count1=0;
public static int count2=0;
public static int count3=0;
static int num=100;
public override void _Ready()
{
dialogue("your mom","response1","response2","response3",0);
}
public void setText2(string ex){
this.Text=ex;
}
public void invisible(){
this.Visible=false;
}
public void dialogue(string Npctext, string response12,string response22,string response32, int check){
Button response1 =(Button)GetChild(0);
Button response2 =(Button)GetChild(1);
Button response3 =(Button)GetChild(2);
response1.Text=response12;
response2.Text=response22;
response3.Text=response32;
this.Text=Npctext;
response1.Visible=true;
response2.Visible=true;
response3.Visible=true;
this.Visible=true;
int count12=count1;
int count22=count2;
int count32=count3;
}
public void dialogueFinish(){
Button response1 =GetNode<Button>("Response1");
Button response2 =GetNode<Button>("Response2");
Button response3 =GetNode<Button>("Response3");
response1.Visible=false;
response2.Visible=false;
response3.Visible=false;
this.Visible=false;
}
}
}
// // Called every frame. 'delta' is the elapsed time since the previous frame.
// public override void _Process(float delta)
// {
//
// }