Ejemplo n.º 1
0
 void Awake()
 {
     if (rubiControl == null) {
         DontDestroyOnLoad (gameObject);
         rubiControl = this;
     } else if (rubiControl != this) {
         Destroy(gameObject);
     }
 }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     currInvuln = false;
     playerMovement = RubiControllerScript.rubiControl.GetComponent <RubiControllerScript> ();
     playerSprite = RubiControllerScript.rubiControl.GetComponent <SpriteRenderer> ();
     anim = RubiControllerScript.rubiControl.GetComponent <Animator> ();
     playerMovement.enabled = true;
 }