コード例 #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
ファイル: Quest.cs プロジェクト: PcloD/Unity-Quest-Manager
 public void OnObjectivesCompleted()
 {
     print(string.Format("completed quest: {0}", questName));
     state = Objective.ObjectiveState.complete;
     if (OnCompleted != null)
     {
         OnCompleted(this);
     }
 }
コード例 #4
0
ファイル: Quest.cs プロジェクト: markdion/Unity-Projects
 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;
 }