Example #1
0
    void Output(WorkerFSMOutput outputKey, Collider collider = null)
    {
        switch (outputKey)
        {
        case WorkerFSMOutput.LeaderDied:
            WorkerDied(collider);
            wc.onLeaderDeath.Invoke();
            AudioManager.Instance.PlaySound("WorkerDeath");
            break;

        case WorkerFSMOutput.WorkerDied:
            WorkerDied(collider);
            AudioManager.Instance.PlaySound("WorkerDeath");
            break;

        case WorkerFSMOutput.LeaderElected:
            seekLeaderPosition.SetClosestLane();
            rb.velocity = Vector3.zero;
            break;

        case WorkerFSMOutput.SeekingMasterMerger:
            tag = "SlaveMerger";
            break;

        case WorkerFSMOutput.MergingDone:
            wc.onMergeOver.Invoke();
            break;

        case WorkerFSMOutput.TutRightInput:
            TutorialManager.Instance.ExitState();
            break;
        }
    }
Example #2
0
 public TransitionBundle(WorkerState source, WorkerState destination, WorkerFSMOutput output)
 {
     Source      = source;
     Destination = destination;
     Output      = output;
 }