コード例 #1
0
    protected override void Start()
    {
        base.Start();
        instance = GameObject.FindGameObjectsWithTag("God")[0].GetComponent <GodTutorial>();

        this.curEventIndex = -1;
        this.LoadNextEvent();
    }
コード例 #2
0
 protected override void HandleCollision(GameObject other)
 {
     // Register a consumable task if we collided with a consumable
     if (other.gameObject.GetComponent <Environment>() && other.gameObject.GetComponent <Environment>().EnvironmentType == EnvironmentType.Consumable)
     {
         GodTutorial.RegisterTask(TutorialTask.Consumable, other.gameObject.GetComponent <Environment>().Consumable.Value);
     }
     base.HandleCollision(other);
 }
コード例 #3
0
 /// <summary>
 /// Handles when the Resume button is pressed by unpausing
 /// </summary>
 public void HandleResume()
 {
     GodTutorial.RegisterTask(TutorialTask.PressPause);
     this.tutorialHelper.SetActive(false);
     TogglePauseMenu();
 }
コード例 #4
0
 /// <summary>
 /// Handles the pause command and registers a pause task with GodTutorial
 /// </summary>
 public override void Pause()
 {
     GodTutorial.RegisterTask(TutorialTask.Pause);
     base.Pause();
 }
コード例 #5
0
 /// <summary>
 /// Handles the jump command and registers a jump task with GodTutorial
 /// </summary>
 /// <param name="magnitude">Additional multiplier to apply to the jump's force</param>
 public override void JumpEnter(float magnitude = 1)
 {
     GodTutorial.RegisterTask(TutorialTask.Jump);
     base.JumpEnter(magnitude);
 }