Exemplo n.º 1
0
 private void Start()
 {
     cursor.transform.position = new Vector3(0, 0, 0);
     // gets PlayerInventory from the object this script is on.
     playerInvetory = GetComponent <PlayerInvetory>();
     controllerMode = PlayerPrefs.GetInt("controllerMode");
 }
Exemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        playerInvetory = GetComponent <PlayerInvetory>();
        rb2d           = GetComponent <Rigidbody2D>();
        animator       = GetComponent <Animator>();

        if (playerInvetory == null || rb2d == null || animator == null)
        {
            return;
        }

        isIdle       = true; //set player idle beginning of game
        isGathering  = false;
        menuIsActive = false;

        animator.SetBool("isIdle", true); //set player idle at beginning of game

        //set idlePosition equal to current position which is idle and not moving
        idlePosition = new Vector2(Input.GetAxis("Horizontal"), Input.GetAxis("Vertical"));

        isAttacking = false;
    }
Exemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     playerInventory = GetComponent <PlayerInvetory>();
     playerCores     = GetComponent <PlayerCores>();
     updateText();
 }