Beispiel #1
0
 private void Awake()
 {
     material = GetComponentInChildren <MeshRenderer>().material;
     dragCancelInputAction = ball.GetComponent <PlayerInput>().actions["putt"];
     Debug.Log("Arrow Adding input listener");
     dragCancelInputAction.performed += HandleDragPerform;
     dragCancelInputAction.canceled  += HandleDragCancel;
 }
        // Start is called before the first frame update
        void Start()
        {
            if (ball.relativeCamera != null)
            {
                if (relativeCamera != null)
                {
                }
                relativeCamera = ball.relativeCamera;
            }

            slider          = GetComponentInChildren <Slider>();
            slider.maxValue = ball.playerData.maxBallPuttForce;

            dragCancelInputAction            = ball.GetComponent <PlayerInput>().actions["Putt"];
            dragCancelInputAction.performed += HandleDragPerform;
            dragCancelInputAction.canceled  += HandleDragCancel;
            gameObject.SetActive(false);
        }