Shamba

counteditor

Mar 12th, 2018
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.55 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class counteditor : MonoBehaviour {
  6.  
  7.     private void OnTriggerEnter(Collider other)
  8.     {
  9.         if(other.gameObject.tag == "Player")
  10.         {
  11.             switch (this.gameObject.tag)
  12.             {
  13.                 case "odd":
  14.                     CubeMovement.loopCount = 1;
  15.                     break;
  16.                 case "even":
  17.                     CubeMovement.loopCount = 0;
  18.                     break;
  19.             }
  20.         }
  21.            
  22.     }
  23. }
Add Comment
Please, Sign In to add comment