Esempio n. 1
0
 private bool UseButtonUp(string inputName)
 {
     if (inputName.Contains("1") || inputName.Contains("2"))
     {
         return(OoskaCustom.GetAxisUp(inputName));
     }
     else
     {
         return(Input.GetButtonUp(inputName));
     }
 }
    private void ChooseGroup()
    {
        if (OoskaCustom.GetAxisDown("ChooseGroup"))
        {
            this.chosedGroupIndex += Mathf.RoundToInt(Input.GetAxisRaw("ChooseGroup"));
            this.chosedGroupIndex  = ClampIndexInArray(chosedGroupIndex, ControlMembre.numberOfLimb);

            int groupDownIndex = ClampIndexInArray(this.chosedGroupIndex - 1, ControlMembre.numberOfLimb);
            int groupUpIndex   = ClampIndexInArray(this.chosedGroupIndex + 1, ControlMembre.numberOfLimb);

            //UI Stuff
            //Increment/decrement on the image array

            this.downSS.UpdateIcon(groupDownIndex);
            this.centerSS.UpdateIconGroup(this.chosedGroupIndex);
            this.upSS.UpdateIcon(groupUpIndex);
        }
    }
    private void ChooseLimb()
    {
        if (OoskaCustom.GetAxisDown("ChooseLimb"))
        {
            this.chosedLimbIndex += Mathf.RoundToInt(Input.GetAxisRaw("ChooseLimb"));

            int limbLeftIndex;
            int limbRightIndex;

            chosedLimbIndex = ClampIndexInArray(this.chosedLimbIndex, this.Limbs.Count);

            limbLeftIndex  = ClampIndexInArray(this.chosedLimbIndex - 1, this.Limbs.Count);
            limbRightIndex = ClampIndexInArray(this.chosedLimbIndex + 1, this.Limbs.Count);

            this.chosedLimb = this.Limbs[this.chosedLimbIndex];
            Debug.Log(chosedLimb.name);

            //UI Stuff
            //Increment/decrement on the image array
            this.leftSS.UpdateIcon(limbLeftIndex);
            this.centerSS.UpdateIcon(this.chosedLimbIndex);
            this.rightSS.UpdateIcon(limbRightIndex);
        }
    }