protected void Awake() { DoneOnce = JunkerGameMode.HasDoneStoryPart(EventChain.name); var clawTarget = GetComponent <ClawTarget>(); if (clawTarget == null) { return; } clawTarget.SetLightsVisible(DoOnce == true && DoOnce != DoneOnce || DoOnce == false); switch (eventTrigger) { case E_EventTrigger.OnClawConnect: clawTarget.OnClawConnect += Add; break; case E_EventTrigger.OnShipDocked: clawTarget.OnShipDocked += Add; break; case E_EventTrigger.OnShipUnDocked: clawTarget.OnShipUnDocked += Add; break; default: break; } }
public void Add() { if (DoOnce == true && DoOnce == DoneOnce) { return; } if (DoOnce == true) { JunkerGameMode.FinishedStoryPart(EventChain.name); DoneOnce = true; } if (EventChain != null) { foreach (GameEvent item in EventChain.eventChain) { EventManager.AddEvent(item); } } if (DoOnce == true) { var clawTarget = GetComponent <ClawTarget>(); clawTarget.SetLightsVisible(DoOnce != DoneOnce || DoOnce == false); } }
protected void Awake() { if (instance != null) { GameObject.Destroy(this); return; } else { instance = this; GameObject.DontDestroyOnLoad(this); } }
public void Add() { if (DoOnce == true && DoOnce == DoneOnce) return; if (DoOnce == true) { JunkerGameMode.FinishedStoryPart(EventChain.name); DoneOnce = true; } if (EventChain != null) foreach (GameEvent item in EventChain.eventChain) { EventManager.AddEvent(item); } }
private void Awake() { if (!JunkerGameMode.HasDoneStoryPart(EventChain.name)) Add(); }