// Start is called before the first frame update void Start() { this.INTList = new List <INPCType>(); DialogNT dialNT = gameObject.AddComponent <DialogNT>(); dialNT.Init(this, dialogUI, dialogID); dialNT.resetDialog = resetDialog; INTList.Add(dialNT); }
void OnTriggerEnter2D(Collider2D other) { PlayerState ps = other.GetComponent <PlayerState>(); DialogNT npc = gameObject.GetComponent <DialogNT>(); if (!!ps && !!npc) { npc.loadNewDialog((ps.State != State.CHAIR_BALL) ? 8 /* GOOD ENDING :) */ : 7 /* BAD ENDING :( */); } Debug.Log("DIALOG ID : " + npc.dialogID); }
// Start is called before the first frame update void Start() { this.INTList = new List <INPCType>(); playerMutilated = false; DialogNT dialNT = gameObject.AddComponent <DialogNT>(); dialNT.Init(this, dialogUI, dialogID); dialNT.resetDialog = resetDialog; DoorguardNT doorNT = gameObject.AddComponent <DoorguardNT>(); doorNT.Init(this, guardedDoor); INTList.Add(dialNT); INTList.Add(doorNT); }