mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-05 18:05:55 +00:00
Computers
This commit is contained in:
parent
f873cba98b
commit
c41967572b
23 changed files with 655 additions and 11 deletions
|
|
@ -21,18 +21,25 @@ public partial class DialogueStarter : Activable
|
|||
_gameManager = this.GetGameManager();
|
||||
|
||||
_dialogic = GetNode("/root/Dialogic");
|
||||
|
||||
_dialogic.Connect("timeline_ended", Callable.From(OnTimelineEnded));
|
||||
}
|
||||
|
||||
private void OnTimelineEnded()
|
||||
{
|
||||
|
||||
if (_dialogic.IsConnected("timeline_ended", Callable.From(OnTimelineEnded)))
|
||||
{
|
||||
_dialogic.Disconnect("timeline_ended", Callable.From(OnTimelineEnded));
|
||||
}
|
||||
|
||||
DialogueEndAction();
|
||||
}
|
||||
|
||||
public override void Activate(ActivationType activationType = ActivationType.Toggle)
|
||||
{
|
||||
_gameManager.ChangeState(GameState.Dialogue);
|
||||
|
||||
_dialogic.Connect("timeline_ended", Callable.From(OnTimelineEnded));
|
||||
|
||||
_dialogic.Call("start", _trackName);
|
||||
// Script dialogic = ResourceLoader.Load("res://addons/dialogic/Other/DialogicClass.gd") as Script;
|
||||
// var dialog = (Node) dialogic.Call("start","timeline");
|
||||
|
|
|
|||
17
Scripts/Interactables/Computer.cs
Normal file
17
Scripts/Interactables/Computer.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class Computer : Interactable
|
||||
{
|
||||
[Export] public Activable Target { get; set; }
|
||||
public override bool Activate()
|
||||
{
|
||||
if (MeetsRequirements())
|
||||
{
|
||||
Target?.Activate();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue