// Start is called before the first frame update void Start() { weaponParentOrigin = weaponParent.localPosition; movement = GetComponent <Movement>(); playerWalk = GetComponent <walking_anim>(); isMoving = false; }
// Start is called before the first frame update void Start() { //sets up start for stamina rectangle on the hud staminaRect = new Rect(Screen.width / 10, Screen.height * 9 / 10, Screen.width / 3, Screen.height / 50); staminaTexture = new Texture2D(1, 1); staminaTexture.SetPixel(0, 0, Color.yellow); staminaTexture.Apply(); stamina = maxStamina; //get components from other scripts cb = GetComponent <walking_anim>(); ib = GetComponent <idle_anim>(); //start idle breathing animation ib.isIdle = true; }