コード例 #1
0
    void Update()
    {
        GuardMushroom.GoToPullPush();
        GuardMushroom.ModeChange();
        GuardMushroom.NowisHit();
        GuardMushroom.PlayerisDead();
        GuardMushroom.QueenisADead();

        GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.MStat.MoveSpeed, GuardMushroom.rotAnglePerSecond);

        if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.AttackDistance)
        {
            if (GuardMushroom.AttackTimer > GuardMushroom.AttackDelay)
            {
                GuardMushroom.SetState(GuardMushroomState.Attack);
                return;
            }
        }

        if (GuardMushroom.AttackTimer < GuardMushroom.AttackDelay && GuardMushroom.GetDistanceFromPlayer() <= GuardMushroom.MStat.AttackDistance)
        {
            GuardMushroom.SetState(GuardMushroomState.Return);
            return;
        }
    }
コード例 #2
0
    void Update()
    {
        GuardMushroom.NowisHit();
        GuardMushroom.GoToPullPush();
        GuardMushroom.QueenisADead();

        Dltime += Time.deltaTime;

        if (Dltime > 0.15f)
        {
            if (GuardMushroom.QueenisAllDead)
            {
                GuardMushroom.SetState(GuardMushroomState.BChase);
                return;
            }

            else if (GuardMushroom.SBombing)
            {
                GuardMushroom.SetState(GuardMushroomState.Sbombing);
                return;
            }

            else
            {
                GuardMushroom.SetState(GuardMushroomState.Return);
                return;
            }
        }
    }
コード例 #3
0
    void Update()
    {
        GuardMushroom.GoToPullPush();
        GuardMushroom.NowisHit();
        GuardMushroom.PlayerisDead();
        GuardMushroom.QueenisADead();

        Dltime += Time.deltaTime;

        if (Dltime > 1.5f)
        {
            if (GuardMushroom.GetDistanceFromPlayer() > GuardMushroom.MStat.AttackDistance)
            {
                GuardMushroom.SetState(GuardMushroomState.Chase);
                Dltime = 0;
                GuardMushroom.AttackTimer = 0f;
                return;
            }

            else
            {
                GuardMushroom.SetState(GuardMushroomState.Return);
                Dltime = 0;
                GuardMushroom.AttackTimer = 0f;
                return;
            }
        }
    }
コード例 #4
0
    void Update()
    {
        GuardMushroom.GoToPullPush();
        GuardMushroom.NowisHit();

        if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.ChaseDistance && (CPlayerManager._instance.isDead == false))
        {
            GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.MStat.MoveSpeed, GuardMushroom.rotAnglePerSecond);
            GuardMushroom.SetState(GuardMushroomState.Chase);
            return;
        }
    }
コード例 #5
0
    void Update()
    {
        GuardMushroom.GoToPullPush();
        GuardMushroom.NowisHit();
        GuardMushroom.PlayerisDead();

        GuardMushroom.GoToDestination(GuardMushroom.Player.position, GuardMushroom.BerserkerMoveSpeed, GuardMushroom.rotAnglePerSecond);

        if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.AttackDistance && GuardMushroom.AttackTimer > GuardMushroom.BerserkerAttackDelay)
        {
            GuardMushroom.SetState(GuardMushroomState.BAttack);
            return;
        }
    }
コード例 #6
0
    void Update()
    {
        GuardMushroom.GoToPullPush();
        GuardMushroom.NowisHit();
        GuardMushroom.PlayerisDead();

        Dltime += Time.deltaTime;

        if (Dltime > 0.78f)
        {
            GuardMushroom.SetState(GuardMushroomState.BChase);
            Dltime = 0;
            return;
        }
    }
コード例 #7
0
    void Update()
    {
        GuardMushroom.TurnToDestination();
        GuardMushroom.GoToPullPush();
        GuardMushroom.NowisHit();
        GuardMushroom.PlayerisDead();
        GuardMushroom.QueenisADead();

        if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.AttackDistance && GuardMushroom.AttackTimer > GuardMushroom.AttackDelay)
        {
            GuardMushroom.SetState(GuardMushroomState.Attack);
            return;
        }

        if (GuardMushroom.GetDistanceFromPlayer() < GuardMushroom.MStat.ChaseDistance && GuardMushroom.GetDistanceFromPlayer() > GuardMushroom.MStat.AttackDistance)
        {
            GuardMushroom.SetState(GuardMushroomState.Chase);
            return;
        }
    }