-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bouncer.cs
48 lines (38 loc) · 1.55 KB
/
Bouncer.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
using System.Collections.Generic;
using Godot;
namespace TSAVideoGame
{
public class Bouncer : RigidBody2D
{
[Export] public bool facingRight;
private List<NPCDialogue> _npcDialogue;
private string _npcName;
[Signal]
public delegate void NpcEntered();
[Signal]
public delegate void NpcExited();
public override void _Ready()
{
_npcName = "Bouncer";
InterfaceSelectionObject obj = new InterfaceSelectionObject(1, "Welcome");
InterfaceSelectionObject obj2 = new InterfaceSelectionObject(2, "Hello");
InterfaceSelectionObject obj3 = new InterfaceSelectionObject(-1, "What is gucci fam");
_npcDialogue = new List<NPCDialogue>
{
new NPCDialogue(new List<InterfaceSelectionObject> {obj, obj2}, "#relatable", 0),
new NPCDialogue(new List<InterfaceSelectionObject> {obj2, obj3}, "your welcome", 1),
new NPCDialogue(new List<InterfaceSelectionObject> {obj3}, "hello epic gamer", 2),
};
//the player would have the choice to say either obj or obj2, since #relatable is the first in the list, if they say welcome, npc would response with your welcome
}
public override void _Process(float delta)
{
ZIndex = (int) Position.y;
}
public void SetNpcDialogue()
{
Interface.dialogueManager.npcDialogue = _npcDialogue;
Interface.dialogueManager.dialogueHeader = _npcName;
}
}
}