Beispiel #1
0
    private void Awake()
    {
        playerAnimator       = GetComponent <Animator>();
        playerRigidBody      = GetComponent <Rigidbody2D>();
        playerSpriteRenderer = GetComponent <SpriteRenderer>();
        carrotGrid           = carrotGridObject.GetComponent <CarrotGrid>();
        currentInputSR       = currentInputObject.GetComponent <SpriteRenderer>();

        mobileInputs = mobileInputsObject.GetComponent <MobileInputs>();
    }
Beispiel #2
0
 private void Awake()
 {
     if (MobileInputs.i != null && MobileInputs.i != this)
     {
         Destroy(this);
     }
     else
     {
         i = this;
         // DontDestroyOnLoad(gameObject);
     }
 }