dronkowitz

SectionTrigger.cs

Jan 27th, 2021 (edited)
971
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class SectionTrigger : MonoBehaviour
  6. {
  7.     public GameObject nextSection;
  8.     public GameObject previousSection;
  9.  
  10.     public void Forward()
  11.     {
  12.         nextSection.SetActive(false);
  13.         previousSection.SetActive(true);
  14.     }
  15.  
  16.     public void Backward()
  17.     {
  18.         nextSection.SetActive(true);
  19.         previousSection.SetActive(false);
  20.     }
  21. }
  22.  
Advertisement
Add Comment
Please, Sign In to add comment