protected override void StateAction()
    {
        switch (m_SummonState)
        {
        case (SummonState.Null):
        {
            m_SummonState = SummonState.IDLE;
        }
        break;

        case (SummonState.IDLE):
        {
            MotionIdle(WaitTime);
        }
        break;

        case (SummonState.DEAD):
        {
            MotionDead();
        }
        break;

        default:

            break;
        }
    }
 public override void Intialize(AIGameManger _aIGameManger)
 {
     neighbors = new List <GameObject>();
     base.Intialize(_aIGameManger);
     m_objInfo.Type           = "Soilder";
     m_objInfo.FollowerTypeID = 1;
     wanderTime    = Random.Range(1, 2);
     WaitTime      = Random.Range(5, 10);
     pos           = Role.transform.position;
     PfbTypeName   = "S1";
     m_SummonState = SummonState.Null;
 }
Exemplo n.º 3
0
        [UsedImplicitly] public void Summon()
        {
            currentSummonGO = currentSummon.summonGO;
            currentSummonGO.SetActive(true);

            elias.Unit.hasSummon     = true;
            elias.Unit.currentSummon = currentSummon;
            summonState = SummonState.Command;
            commandMenuFirstSelected = commandMenus[summonIndex].transform.GetChild(0).gameObject;

            chargeEffect.transform.DOScale(0.1f, 0.5f);
            chargeEffect.SetActive(false);

            Timing.RunCoroutine(SetCommandAnimation());
        }
    protected override void MotionIdle(float w_time)
    {
        timer += Time.deltaTime;
        if (timer > checkInterval)
        {
            //audioController.PlaySound(0,.1f);
            particileControl.Play(2, 3F, Role.transform.position);
            aIGameManger.SummonSoilderAI(this, Role, detectRadius);
            currentSummonNum += 1;
            timer             = 0;
        }

        if (currentSummonNum >= SummonNum)
        {
            m_SummonState = SummonState.DEAD;
        }
    }
Exemplo n.º 5
0
        private IEnumerator <float> Dismiss()
        {
            BattleInput._controls.Disable();
            elias.Unit.anim.Play($"Ability {summonAbility.attackState}", 0);
            ShowChargeEffect();

            yield return(Timing.WaitForSeconds(0.75f));

            currentSummonGO.SetActive(false);

            chargeEffect.transform.DOScale(0.1f, 0.5f);
            chargeEffect.SetActive(false);

            CloseSubMenu();
            elias.Unit.hasSummon = false;
            summonState          = SummonState.Summon;

            Invoke(nameof(SetSummonAnimation), 1);
            BattleInput._controls.Enable();
        }