public override void Begin() { if (body == null || body.FixtureList == null) return; stopwatch.Start(); State = ObjectiveState.Running; base.Begin(); }
public void Refresh() { timer = Period; switch (Track.State) { case Objective.ObjectiveState.Enabled: case Objective.ObjectiveState.Locked: case Objective.ObjectiveState.JustFinished: for (int i = 0; i < Arrows.Count; i++) { Arrows[i].material = UnLit; } break; case Objective.ObjectiveState.Finished: for (int i = 0; i < Arrows.Count; i++) { Arrows[i].material = Lit; } break; default: break; } lastState = Track.State; }
public void OnObjectivesCompleted() { print(string.Format("completed quest: {0}", questName)); state = Objective.ObjectiveState.complete; if (OnCompleted != null) { OnCompleted(this); } }
public void OnObjectivesCompleted() { print(string.Format("completed quest: {0}", questName)); state = Objective.ObjectiveState.complete; if(OnCompleted != null) { OnCompleted(this); } }
public override void Begin() { if (body == null || body.FixtureList == null) { return; } stopwatch.Start(); State = ObjectiveState.Running; base.Begin(); }
public bool ObjectiveTouched(Fixture f1, Fixture f2, Contact contact) { if (game.ragdollManager.ragdoll.OwnsFixture(f1) || game.ragdollManager.ragdoll.OwnsFixture(f2)) { stopwatch.Stop(); State = ObjectiveState.Complete; } return(true); }
public bool ObjectiveTouched(Fixture f1, Fixture f2, Contact contact) { if (game.ragdollManager.ragdoll.OwnsFixture(f1) || game.ragdollManager.ragdoll.OwnsFixture(f2)) { stopwatch.Stop(); State = ObjectiveState.Complete; } return true; }
void OnTriggerEnter(Collider other) { if (other.CompareTag("Player")) { if (objective == null) { Debug.LogError("Objective target had no objective set"); return; } if (objective.state == Objective.ObjectiveState.active && (kind == Objective.ObjectiveType.collect || kind == Objective.ObjectiveType.travel)) { state = Objective.ObjectiveState.complete; } } }
void SetObjectiveState(ObjectiveType objective, Objective.ObjectiveState state) { objectives[(int)objective].SetState(state); }
void Start() { state = Objective.ObjectiveState.active; visibleIndicator = true; }
public override void Reset() { stopwatch.Reset(); State = ObjectiveState.Off; base.Reset(); }