예제 #1
0
        public override void Begin()
        {
            if (body == null || body.FixtureList == null) return;
            stopwatch.Start();
            State = ObjectiveState.Running;
 	        base.Begin();
        }
예제 #2
0
    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;
    }
예제 #3
0
 public void OnObjectivesCompleted()
 {
     print(string.Format("completed quest: {0}", questName));
     state = Objective.ObjectiveState.complete;
     if (OnCompleted != null)
     {
         OnCompleted(this);
     }
 }
예제 #4
0
 public void OnObjectivesCompleted()
 {
     print(string.Format("completed quest: {0}", questName));
     state = Objective.ObjectiveState.complete;
     if(OnCompleted != null)
     {
         OnCompleted(this);
     }
 }
예제 #5
0
 public override void Begin()
 {
     if (body == null || body.FixtureList == null)
     {
         return;
     }
     stopwatch.Start();
     State = ObjectiveState.Running;
     base.Begin();
 }
예제 #6
0
 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);
 }
예제 #7
0
        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;
        }
예제 #8
0
    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;
            }
        }
    }
예제 #9
0
    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;
            }
        }
    }
예제 #10
0
 void SetObjectiveState(ObjectiveType objective, Objective.ObjectiveState state)
 {
     objectives[(int)objective].SetState(state);
 }
예제 #11
0
 void Start()
 {
     state = Objective.ObjectiveState.active;
     visibleIndicator = true;
 }
예제 #12
0
 public override void Reset()
 {
     stopwatch.Reset();
     State = ObjectiveState.Off;
     base.Reset();
 }
예제 #13
0
 public override void Reset()
 {
     stopwatch.Reset();
     State = ObjectiveState.Off;
     base.Reset();
 }
예제 #14
0
 void Start()
 {
     state            = Objective.ObjectiveState.active;
     visibleIndicator = true;
 }