示例#1
0
    public void ActivatePower()
    {
        switch (_CombatManager._auxPower)
        {
        case 0:
            Heal();
            break;

        case 1:
            Guard();
            break;

        case 2:
            KeenEye();
            break;

        case 3:
            Frenzy();
            break;
        }
        _skillsButton.interactable = false;
        _auxButton.interactable    = false;
        _combatUI.UpdateAP();
        _tooltip.DisableTooltip();
    }
示例#2
0
 public void InitTile(string name, UnityAction mainCallback, UnityAction optionCallback, bool starVisible, DateTime created, DateTime modified, string projectId, string sceneId,
                      string sceneName)
 {
     base.InitTile(name, mainCallback, optionCallback, starVisible, created, modified);
     ProjectId = projectId;
     SceneId   = sceneId;
     InitTile(projectId);
     this.sceneName.text = "Scene: " + sceneName;
     SetTimestamp(modified.ToString());
     Tooltip.DisableTooltip();
 }
示例#3
0
    public void ButtonToggle(int i)
    {
        _anim = _player.GetComponent <Animator>();
        _toolTip.DisableTooltip();
        //Switch statement controls what happens on each button press
        switch (i)
        {
        //"Move" Button - on press, disable attack options, set sprite to red
        case 0:
            _playerTurn._attackToggle = false;
            _moveButton.image.sprite  = _moveEnabled;
            DeactivateButtons(false);
            break;

        //"Attack" button - disable move sprite, open attack options, set sprite to red
        case 1:
            _playerTurn._attackToggle = !_playerTurn._attackToggle;
            _moveButton.image.sprite  = _moveDisabled;
            AttackButtonSprite(1);
            DeactivateButtons(_playerTurn._attackToggle);
            _playerTurn._attackCost = 8;
            break;

        //"Switch Weapons" button - disable attack options and toggle player weapons
        case 2:
            _playerTurn._attackToggle = false;
            _playerTurn._meleeToggle  = !_playerTurn._meleeToggle;
            _anim.SetBool("WeaponB", _playerTurn._meleeToggle);
            DeactivateButtons(false);
            _playerTurn._ap -= 8;
            UpdateAP();
            break;

        //First Attack option - set AP cost to low, chance to hit to low
        case 3:
            _activeAction           = "Quick Shot";
            _playerTurn._attackCost = 5;
            AttackButtonSprite(0);
            _calc._toHitModifier = -20;
            break;

        //second Attack option - (default) regular attack stats
        case 4:
            _activeAction           = "Regular Shot";
            _playerTurn._attackCost = 8;
            AttackButtonSprite(1);
            _calc._toHitModifier = 0;
            break;

        //Third Attack option - high AP cost, increase to hit chance
        case 5:
            _activeAction           = "Aimed Shot";
            _playerTurn._attackCost = 12;
            AttackButtonSprite(2);
            _calc._toHitModifier = 20;
            break;

        case 6:
            break;

        default:
            print("Error - Button Toggle");
            break;
        }
    }