zimethsuki

TriggerShot

Mar 29th, 2016
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.60 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class TriggerShot : MonoBehaviour
  4. {
  5.     // public MoveStateBehaviour.State stateChange;
  6.     public GameObject toDestroy;
  7.     public static bool isMissed = false;
  8.  
  9.     void Awake(){
  10.         toDestroy = GetComponent<Sensor>().containTarget;
  11.     }
  12.  
  13.     void Start(){
  14.         DestroyThis();
  15.  
  16.     }
  17.  
  18.     public void DestroyThis(){
  19.         if (toDestroy != null){
  20.             Debug.Log("ToDestroy : is not null");
  21.             Debug.Log(toDestroy);
  22.         }
  23.         else{
  24.             Debug.Log("ToDestroy : is null");
  25.             Debug.Log(toDestroy);
  26.         }
  27.     }
  28. }
Add Comment
Please, Sign In to add comment