From e9ea621b93fbb58d9edfca8375918791637bbd52 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 30 Dec 2020 20:59:04 +0800 Subject: +init --- Client/Assembly-CSharp/SabotageTask.cs | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 Client/Assembly-CSharp/SabotageTask.cs (limited to 'Client/Assembly-CSharp/SabotageTask.cs') diff --git a/Client/Assembly-CSharp/SabotageTask.cs b/Client/Assembly-CSharp/SabotageTask.cs new file mode 100644 index 0000000..2f3e21a --- /dev/null +++ b/Client/Assembly-CSharp/SabotageTask.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; + +public abstract class SabotageTask : PlayerTask +{ + protected bool didContribute; + + public ArrowBehaviour[] Arrows; + + public void MarkContributed() + { + this.didContribute = true; + } + + protected void SetupArrows() + { + if (base.Owner.AmOwner) + { + List list = base.FindConsoles(); + for (int i = 0; i < list.Count; i++) + { + int consoleId = list[i].ConsoleId; + this.Arrows[consoleId].target = list[i].transform.position; + this.Arrows[consoleId].gameObject.SetActive(true); + } + return; + } + for (int j = 0; j < this.Arrows.Length; j++) + { + this.Arrows[j].gameObject.SetActive(false); + } + } +} -- cgit v1.1-26-g67d0