コード例 #1
0
 void OnTriggerExit2D(Collider2D collider)
 {
     hookshot  = null;
     player    = null;
     canSwitch = false;
 }
コード例 #2
0
 void Start()
 {
     hookShot = GameObject.Find("player").GetComponent <HookShotScript>();
     joint2D  = GetComponent <DistanceJoint2D>();
 }
コード例 #3
0
 void OnTriggerEnter2D(Collider2D collider)
 {
     hookshot  = collider.GetComponent <HookShotScript> ();
     player    = collider.GetComponent <PlayerScript> ();
     canSwitch = true;
 }