Beispiel #1
0
    void SuccessTap(GameObject line, int Upper, bool cut)
    {
        if (cut)
        {
            combo = 0;
        }
        else
        {
            combo++;
            if (combo >= maxcombo)
            {
                maxcombo = combo;
            }
        }
        switch (Upper)
        {
        case 0:
            _UIManager.Hantei("Parfect");
            hanteis[0]++;
            _SE.SetSE(0);
            _scoreManager.AddScore(0);
            break;

        case 1:
            _UIManager.Hantei("Great");
            hanteis[1]++;
            _SE.SetSE(1);
            _scoreManager.AddScore(1);
            break;

        case 2:
            _UIManager.Hantei("Nice");
            hanteis[2]++;
            _SE.SetSE(2);
            _scoreManager.AddScore(2);
            break;

        case 3:
            _UIManager.Hantei("Bad");
            hanteis[3]++;
            _SE.SetSE(2);
            _scoreManager.AddScore(3);
            break;
        }
        score += Upper;
        _UIManager.ComboCount(combo);
        Destroy(line);
        _LineCheckNoteCount++;
    }
Beispiel #2
0
    private void OnTriggerEnter(Collider other)
    {
        //AttackAreaのついている攻撃が来たら属性を調べる
        if (other.gameObject.GetComponent <AttackArea>())
        {
            AttackMagic = other.gameObject.GetComponent <AttackArea>();

            //プレイヤーの攻撃でしか壊せない
            if (AttackMagic.aligment == aligment.player)
            {
                Attackele = AttackMagic.element.type;
                //全ての攻撃で壊れるbool
                if (ALL || Attackele == Weakele)
                {
                    GetDamage(AttackMagic.Damage);
                    if (_HP <= 0)
                    {
                        SEManager.SetSE(destSE);
                        //HPを減らす攻撃であれば壊れる
                        Destroy(gameObject);
                    }
                }
            }
        }
    }
    /// <summary>
    /// 弾が発射された際の処理
    /// </summary>
    public void ShotStart()
    {
        bulletType = parent.bulletType;
        //弾道の種別による効果設定
        AddBulletEffect(bulletType);

        isActive = true;
        switch (bulletType)
        {
        case BulletType.beam:
            SEManager.SetSE(MagicSystemManager.instance.SEManager.elementBeam.GetValue(elementType), gameObject);
            break;

        case BulletType.homingExplosion:
        case BulletType.explosion:
            //後に爆発するが今は直線に飛ぶ弾の場合
            if (!isBomb)
            {
                //通常のSEを鳴らす
                SEManager.SetSE(MagicSystemManager.instance.SEManager.elementShot.GetValue(elementType), gameObject);
            }
            break;

        default:
            SEManager.SetSE(MagicSystemManager.instance.SEManager.elementShot.GetValue(elementType), gameObject);
            break;
        }
    }
    private IEnumerator BombStart(float time, GameObject target)
    {
        SEManager.SetSE(MagicSystemManager.instance.SEManager.elementBomb.GetValue(elementType), target);
        yield return(new WaitForSeconds(time));

        Destroy(target);
    }
 private void EndMonsterHouse()
 {
     for (int i = 0; i < WallList.Count; i++)
     {
         WallList[i].SetActive(false);
     }
     SEManager.SetSE(SE);
     gameObject.SetActive(false);
 }
Beispiel #6
0
    //作成 針ヶ谷天紀
    public void Used(GameObject Player)
    {
        switch (itemtype)
        {
        case Itemtype.HPHeal:
            Player.GetComponent <PlayerController>().HPHeal(Heal);
            break;

        case Itemtype.MPHeal:
            PlayerController._MP += Heal;
            break;
        }
        SEManager.SetSE(MagicSystemManager.instance.SEManager.Heal);
        Destroy(gameObject);
    }
 protected virtual void Start()
 {
     if (button == null)
     {
         button = GetComponent <Button>();
     }
     if (PushSE)
     {
         button.onClick.AddListener(() => SEManager.SetSE(PushSE));
     }
     else
     {
         button.onClick.AddListener(() => SEManager.SetSE(MagicSystemManager.instance.SEManager.ButtonPush));
     }
 }
    private IEnumerator ShotAction(GameObject target)
    {
        NowCoroutine = ShotAction(target);
        Sensor       = PlayerSensor.GetComponent <PlayerSensor>();
        //targetが感知範囲から出た時にShootingがのtreuときfalseにしてwhile抜ける
        while (Sensor.GetPL_Search() && GetShooting())
        {
            // if (target.GetComponent<Character>().HP <= 0)
            //{ break; }
            if (!shootStop)
            {
                shootStop = true;
                //弾を生成する
                GameObject Bullets = Instantiate(Bullet, transform.position, Quaternion.identity);
                //弾に初速を与える
                Bullets.GetComponent <Rigidbody>().AddForce(transform.forward * ShotSpeed, ForceMode.Impulse);
                Bullets.AddComponent <AttackArea>();
                Bullets.GetComponent <AttackArea>().aligment     = aligment.enemy;
                Bullets.GetComponent <AttackArea>().DestroyCheck = character.DamageObjDestroy;
                Bullets.GetComponent <AttackArea>().Damage       = Damage.GetValue();
                //判別用のタグをつける
                Bullets.tag = Tags.Magic;

                SEManager.SetSE(MagicSystemManager.instance.SEManager.mizugorowaShot);
            }

            //WaitTimeの間、待って再度実行する
            //yield return new WaitForSeconds(WaitTime);
            while (CoolTime <= WaitTime.GetValue())
            {
                yield return(null);

                CoolTime += Time.deltaTime;
            }
            shootStop = false;
            CoolTime  = 0;
        }

        SetCoroutineReset();
        offShooting();
    }
Beispiel #9
0
    //敵がスポーン位置から出現
    IEnumerator Monstar_Spawn()
    {
        //PLSenserにプレイヤーが入ったら
        while (PLSenser.GetPL_Search())
        {
            int a    = 0;
            int Rand = Random.Range(0, SpawnPosList.Count);
            //スポーン位置に敵がいたら
            if (SpawnPosList[Rand].GetComponent <EnemySpawnArea>().inArea)
            {
                if (a <= 50)
                {
                    a++;
                    yield return(null);

                    continue;
                }
            }

            //敵の数(MonsterAmount)が現在の表示している数より少ない時
            if (EnemyList.Count < MonsterAmount)
            {
                GameObject PopEnemy = Instantiate(Enemy.GetValue(), SpawnPosList[Rand].transform.position, Quaternion.identity);
                EnemyList.Add(PopEnemy);
                PopEnemy.GetComponent <EnemyController>().SetOnDest(EnemyListDest);
                SEManager.SetSE(spawnSE);
                for (int i = 0; i < effectCount; i++)
                {
                    GameObject effect = Instantiate(spawnEffect);
                    Vector3    pos    = PopEnemy.transform.position;
                    pos.y -= 0.5f;
                    effect.transform.position = pos;
                    Destroy(effect, effectTime);
                }
                //Debug.Log("a");
            }
            yield return(new WaitForSeconds(SpawnTime));
        }
        SpawnStart = false;
    }
Beispiel #10
0
    private void OnTriggerEnter(Collider other)
    {
        bool isStart = false;

        //プレイヤーがモンスターハウス内に入った時
        if (other.gameObject.tag == Tags.Player)
        {
            //壁を作る
            for (int i = 0; i < WallList.Count; i++)
            {
                WallList[i].SetActive(true);
                isStart = true;
            }
            //enemyが出現
            for (int i = 0; i < EnemyList.Count; i++)
            {
                if (!EnemyList[i].activeSelf)
                {
                    EnemyList[i].SetActive(true);

                    ////見た目が変になってしまったので無し
                    //Vector3 pos = EnemyList[i].transform.position;
                    ////pos.y -= 0.5f;
                    //GameObject effect = Instantiate(spawnEffect);
                    //effect.transform.position = pos;
                    //Destroy(effect, effectTime);

                    isStart = true;
                }
            }

            if (isStart)
            {
                SEManager.SetSE(spawnSE);
            }
        }
    }
Beispiel #11
0
    private void OnTriggerEnter(Collider other)
    {
        //AttackAreaのついている攻撃が来たら
        if (other.gameObject.GetComponent <AttackArea>())
        {
            AttackMagic = other.gameObject.GetComponent <AttackArea>();
            //プレイヤーの攻撃でしか壊せない
            if (AttackMagic.aligment == aligment.player)
            {
                GetDamage(AttackMagic.Damage);

                if (HP <= 0)
                {
                    foreach (GameObject obj in WallList)
                    {
                        Destroy(obj);
                    }
                    //HPを減らす攻撃であれば壊れる
                    SEManager.SetSE(SE);
                    Destroy(gameObject);
                }
            }
        }
    }
 public override void TakeAttack(float value, Vector3 HitPosition, AbnState ele = null)
 {
     base.TakeAttack(value, HitPosition, ele);
     SEManager.SetSE(MagicSystemManager.instance.SEManager.Damage);
 }