Esempio n. 1
0
    public void SetPivot()
    {
        WallPivot += PivotMove;
        PivotMove  = 0;
        if (WallPivot > WallMax)
        {
            WallPivot = WallMax;
        }
        else if (WallPivot < 0)
        {
            WallPivot = 0;
        }
        gameManager.ins.UserStatus [gameManager.CHAMPION].WallDistance   = WallPivot;
        gameManager.ins.UserStatus [gameManager.CHALLANGER].WallDistance = WallMax - WallPivot;
        DashPivotX = WallManager.ins.WallPivot - (WallManager.WallMax / 2);

        for (int i = 0; i < 2; i++)
        {
            string  ProgressBarName = (i == 0 ? "Champion" : "Challanger") + "Distance";
            Vector2 DistanceBar     = new Vector2();
            DistanceBar.x = gameManager.ins.UserStatus [i].WallDistance;
            DistanceBar.y = WallMax;
            UIProgressBar.SetData(ProgressBarName, DistanceBar);
        }
    }
Esempio n. 2
0
    public void MPProgressBar()
    {
        string  ProgressBarName = (Controller == 0 ? "Champion" : "Challanger") + "MP";
        Vector2 costs           = new Vector2();

        costs.x = Cost;
        costs.y = MaxCost;
        UIProgressBar.SetData(ProgressBarName, costs);
    }
Esempio n. 3
0
    void Start()
    {
        MPProgressBar();
        Vector2 Hps = new Vector2();

        Hps.x = HP;
        Hps.y = MaxHP;
        UIProgressBar.SetData((Controller == 0 ? "Champion" : "Challanger") + "HP", Hps);
        usingPotion = false;
    }
    private void OnScoreChanged(int newScore)
    {
        score.text = newScore.ToString();

        var level = scoreController.LevelSettings.GetLevelByScore(newScore);

        if (currentLevel != level)
        {
            currentLevel = level;
            ChangeLevel();
        }
        levelProgressBar.SetData(newScore,
                                 scoreController.LevelSettings.GetMaxScoreByLevel(currentLevel - 1),
                                 scoreController.LevelSettings.GetMaxScoreByLevel(currentLevel));
    }
Esempio n. 5
0
    public IEnumerator HPDownAnimation()
    {
        string  ProgressBarName = (Controller == 0 ? "Champion" : "Challanger") + "HP";
        Vector2 Hps             = new Vector2();
        Vector2 YellowHps       = new Vector2();

        YellowHps = UIProgressBar.GetData(ProgressBarName);
        Hps.x     = HP;
        Hps.y     = MaxHP;
        UIProgressBar.SetData(ProgressBarName, Hps);
        ProgressBarName += "Y";
        if (isYellowCanSee)
        {
            yield break;
        }
        isYellowCanSee = true;
        while (YellowHps.x > HP)
        {
            YellowHps.x -= 2f;
            UIProgressBar.SetData(ProgressBarName, YellowHps);
            yield return(null);
        }
        isYellowCanSee = false;
    }