Exemplo n.º 1
0
 public FinalizedFightBuilder Initial(FightPhase phase)
 {
     _initial = phase;
     return(this);
 }
Exemplo n.º 2
0
        private void OnAttackComplete()
        {
            Debug.Log("OnAttackComplete.");

            FightPhase nextPhase = FightPhase.Attack1;

            switch (fightPhase)
            {
            case FightPhase.Attack1:
                if (fightInformation.Attack2 != null)
                {
                    nextPhase = FightPhase.Attack2;
                }
                else if (fightInformation.Back1 != null)
                {
                    nextPhase = FightPhase.Back1;
                }
                else
                {
                    nextPhase = FightPhase.Completed;
                }

                break;

            case FightPhase.Attack2:
                if (fightInformation.Back1 != null)
                {
                    nextPhase = FightPhase.Back1;
                }
                else
                {
                    nextPhase = FightPhase.Completed;
                }
                break;

            case FightPhase.Back1:
                if (fightInformation.Back2 != null)
                {
                    nextPhase = FightPhase.Back2;
                }
                else
                {
                    nextPhase = FightPhase.Completed;
                }
                break;

            case FightPhase.Back2:
                nextPhase = FightPhase.Completed;
                break;

            default:
                nextPhase = FightPhase.Completed;
                break;
            }

            fightPhase = nextPhase;
            switch (nextPhase)
            {
            case FightPhase.Attack2:
                Invoke("DoSubjectAttack", 0.2f);
                break;

            case FightPhase.Back1:
            case FightPhase.Back2:
                Invoke("DoTargetAttack", 0.2f);
                break;

            case FightPhase.Completed:
                CompletFight();
                break;

            default:
                break;
            }
        }
Exemplo n.º 3
0
 public FinalizedFightBuilder Counter(FightPhase phase)
 {
     _counter = phase;
     return(this);
 }
Exemplo n.º 4
0
 public FinalizedFightBuilder Double(FightPhase phase)
 {
     _double = phase;
     return(this);
 }
Exemplo n.º 5
0
 //结束阶段
 public virtual void EndPhase(FightPhase fightPhase, FightHero target, FightHero other, string data)
 {
 }
Exemplo n.º 6
0
 public FinalizedFightBuilder Flank(FightPhase phase)
 {
     _flank = phase;
     return(this);
 }
Exemplo n.º 7
0
        private void OnStateChanged(Fight fight, FightPhase phase)
        {
            if (phase == FightPhase.Placement)
            {
                m_bot.CallDelayed(500, PlaceToWeakestEnemy);

                m_bot.CallDelayed(2500, new Action(() => m_bot.SendToServer(new GameFightReadyMessage(true))));
            }
        }
Exemplo n.º 8
0
 //敌方行动阶段
 public virtual void OtherActionPhase(FightPhase fightPhase, FightHero target, FightHero other, string data)
 {
 }
Exemplo n.º 9
0
    public void Update()
    {
        matchUI();
        MatchLogic();

        switch (currentFightPhase)
        {
        case FightPhase.PreMatch:

            _PlayerMomentum    = 0;
            _PlayerMomentum   += _initPlayerMomentum;
            _OpponentMomentum  = 0;
            _OpponentMomentum += _initOpponentMomentum;
            _MatchHeat         = 0;
            _MatchHeat        += _initialMatchHeat;

            _MatchTimeMin = 0;
            HideMoves(true);

            break;

        case FightPhase.PlayerTurnInput:

            //Full_Match_UI.gameObject.SetActive(true);
            HideMoves(false);

            break;

        case FightPhase.PlayerTurnOutcome:

            //Full_Match_UI.gameObject.SetActive(false);
            PerformMove();

            break;

        case FightPhase.PlayerMove:

            _timer -= 1 * Time.deltaTime;
            if (_timer <= 0)
            {
                currentFightPhase++;
                _timer = 3;
            }

            break;

        case FightPhase.CPUTurnInput:

            HideMoves(true);
            CPUGetMove();

            break;

        case FightPhase.CPUTurnOutcome:

            NextMinute();
            CooldownCheck();
            currentFightPhase = FightPhase.PlayerTurnInput;

            break;
        }
    }
Exemplo n.º 10
0
 public virtual IEnumerator SpecialAttack(FightPhase phase, MapDimensions dimensions, CombatantView receiverView, WeaponHitSeverity severity)
 {
     throw new InvalidOperationException("Combatant: " + CombatantId + " has no special attack.");
 }
Exemplo n.º 11
0
 //Get CPU Move
 public void CPUGetMove()
 {
     //_currentMove = Random.RandomRange(0, opponent.Moves.Length);
     //_MatchHeat += 5;
     currentFightPhase = FightPhase.CPUTurnOutcome;
 }
Exemplo n.º 12
0
 protected void SetPhase(FightPhase phase)
 {
     Phase = phase;
     OnStateChanged(phase);
 }
Exemplo n.º 13
0
 //使用双方被动技能
 private void UseProssiveSkill(FightPhase fightPhase, FightHero player_1, FightHero player_2)
 {
     player_1.Hero_Card.Prossive_skill_function(fightPhase, player_1, player_2);
     player_2.Hero_Card.Prossive_skill_function(fightPhase, player_2, player_1);
 }
Exemplo n.º 14
0
 //主动技能
 public void Action_skill_function(FightPhase fightPhase, FightHero source, FightHero target)
 {
     Action_skill.skill_function(fightPhase, source, target);
 }
Exemplo n.º 15
0
 public Skill(int skill_id, string skill_name, string skill_function_name, string skill_describe, bool is_action_skill, FightPhase skill_phase, float skill_cd, string skill_effect_path)
 {
     this.Skill_id            = skill_id;
     this.Skill_name          = skill_name;
     this.Skill_describe      = skill_describe;
     this.isActionSkill       = is_action_skill;
     this.Skill_phase         = skill_phase;
     this.Skill_function_name = skill_function_name;
     this.Skill_cd            = skill_cd;
     this.Skill_effect_path   = skill_effect_path;
     this.Skill_enable        = true;
 }