示例#1
0
    //Figure out what to do based on the
    //cheat that needs to be activated
    private void ActivateCheat(CHEAT cheat)
    {
        switch (cheat)
        {
        case CHEAT.HEIGHTENED_FOCUS:     //Increase effectiveness of pushes
            deathStone_speed_mod = 1.2f;
            buff_timer          += 0.01f;
            BUFF_TIME            = 1;
            cheat_risk          += 30;
            break;

        case CHEAT.SELECTIVE_NULLIFICATION:     //Decrease enemy push effectiveness
            enemy.SelectiveNullification();
            cheat_risk += 30;
            break;

        case CHEAT.FINISHING_TOUCH:     //Push the deathstone a set distance
            deathStone.FinishingTouch(finishing_touch_distance);
            cheat_risk += 60;
            break;

        case CHEAT.HOME_FIELD_ADVANTAGE:     //Make pushes less effective on player field side
            homeFieldActive = true;
            buff_timer     += 0.01f;
            BUFF_TIME       = 1;
            cheat_risk     += 30;
            break;

        case CHEAT.DESPERATE_MEASURES:     //Make pushes more effective when very close to either player
            desperateActive = true;
            buff_timer     += 0.01f;
            BUFF_TIME       = 1;
            cheat_risk     += 60;
            break;

        case CHEAT.ADVANCED_FORMULAE:     //Make inputs more difficult for the other player
            enemy.AdvancedFormulae();
            cheat_risk += 15;
            break;

        case CHEAT.EXPERT_FORMULAE:     //Make inputs even more difficult for the other player
            enemy.ExpertFormulae();
            cheat_risk += 15;
            break;

        case CHEAT.ARCANE_LOCK:     //Give yourself a single input, but a debuff to push distance
            MAX_KEY_INDEX        = 0;
            deathStone_speed_mod = 0.6f;
            buff_timer          += 0.01f;
            BUFF_TIME            = 1;
            cheat_risk          += 15;
            break;
        }
        //Start the timer and disable the cheat
        //ui elements
        CHEAT_TIME   = 2;
        cheat_timer += 0.01f;
        cheat_displays[0].enabled = false;
        cheat_displays[1].enabled = false;
    }
示例#2
0
    //Get new cheats to use after the timer
    //has counted down
    private void GetNewCheats()
    {
        //Reset variables
        cheat_timer   = 0;
        MAX_KEY_INDEX = 3;
        enemy.ResetDebuff();
        CHEAT c1 = cheats[0];
        CHEAT c2 = cheats[1];

        cheat_displays[0].enabled = true;
        cheat_displays[1].enabled = true;
        int index = 0;

        //Acquire new random cheats
        while (c1 == cheats[0])
        {
            index     = Random.Range(0, 7);
            cheats[0] = GameManager.cheat_list[index];
            cheat_displays[0].sprite = cheat_sprites[index];
        }
        while (c2 == cheats[1] || cheats[1] == cheats[0])
        {
            index     = Random.Range(0, 7);
            cheats[1] = GameManager.cheat_list[index];
            cheat_displays[1].sprite = cheat_sprites[index];
        }
    }