Shamba

Starter

Jan 21st, 2019
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class starter : MonoBehaviour {
  6.  
  7.     public bool Cubestart = false;
  8.  
  9.     private void OnTriggerEnter(Collider other)
  10.     {
  11.         if(other.gameObject.tag == "Player")
  12.         {
  13.             if(Cubestart)
  14.             {
  15.                 CubeMovement.move = true;
  16.                 Vehicle_movement.Vstart = false;
  17.             }
  18.             else
  19.             {
  20.                 CubeMovement.move = false;
  21.                 Vehicle_movement.Vstart = true;
  22.             }
  23.         }
  24.     }
  25.  
  26.  
  27. }
Add Comment
Please, Sign In to add comment