Esempio n. 1
0
 void OnEnable()
 {
     //pppp = GameObject.FindGameObjectWithTag ("Player");
     if (GameMaster.pppppp == null)
     {
         p    = GameObject.FindGameObjectWithTag("Player").GetComponent <player1controllerwithjump> ();
         rb   = GameObject.FindGameObjectWithTag("Player").GetComponent <Rigidbody2D> ();
         c    = GameObject.FindGameObjectWithTag("Player").GetComponent <crouch> ();
         anim = GameObject.FindGameObjectWithTag("Player").GetComponent <Animator> ();
     }
     else
     {
         p    = GameMaster.pppppp.GetComponent <player1controllerwithjump> ();
         rb   = GameMaster.pppppp.GetComponent <Rigidbody2D> ();
         c    = GameMaster.pppppp.GetComponent <crouch> ();
         anim = GameMaster.pppppp.GetComponent <Animator> ();
     }
     starttime = 0f;
 }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     p = GetComponent <player1controllerwithjump> ();
 }