예제 #1
0
 public void ReadyUp()
 {
     if (trackedMonster == BC.player)
     {
         playerController.currentUserState = PlayerController.PlayerState.READY;
         currentState = GaugeState.INCREASING;
     }
 }
예제 #2
0
    void Awake()
    {
        BC    = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <BattleController>();
        state = GaugeState.INCREASING;
        GameObject tickWindow = GameObject.FindGameObjectWithTag("TickWindow");

        transform.SetParent(tickWindow.transform);
        rectTransform           = GetComponent <RectTransform>();
        transform.localPosition = new Vector2(windowMinBound, 0);
    }
예제 #3
0
 void ComputeIdle()
 {
     //get percentage total assuming our threshold is 100
     idlePercentage = (monsterController.currentSpeed / BC.threshold) * 100f;
     //if we are not ready (at 100%) then keep incrementing position of tick
     if (idlePercentage <= 100.0f)
     {
         //apply percentage in relation to the area of interest (our wait area from -250 to 250)
         positionX = windowMinBound + idlePercentage * (rangeWaitBound / 100.0f);
         transform.localPosition = new Vector2(positionX, positionY);
     }
     else
     {
         state = GaugeState.STOP;
         return;
     }
 }
예제 #4
0
    // Update is called once per frame
    void Update()
    {
        gaugeTimer += Time.deltaTime;
        if (gaugeTimer >= decrementSpeedSeconds)
        {
            gaugeTimer = 0;
            GaugeDecrease();
        }

        if (currentAmount <= 25)
        {
            currentState = GaugeState.LOW;
        }
        if (currentAmount > 25 && currentAmount < 75)
        {
            currentState = GaugeState.MID;
        }
        if (currentAmount >= 75)
        {
            currentState = GaugeState.HIGH;
        }
    }
예제 #5
0
 public void ChangeState(GaugeState state)
 {
     done       = false;
     this.state = state;
 }