Ejemplo n.º 1
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.CompareTag("Player"))
     {
         player    = other.gameObject.GetComponent <NuclearMan>();
         isHugging = true;
     }
 }
Ejemplo n.º 2
0
 void OnTriggerExit2D(Collider2D other)
 {
     if (other.CompareTag("Player"))
     {
         player    = null;
         isHugging = false;
     }
 }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     player = transform.parent.GetComponent <NuclearMan>();
 }
Ejemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     playerScript           = player.GetComponent <NuclearMan>();
     gameEndingBarrelScript = gameEndingBarrel.GetComponent <GameEndingBarrel>();
 }