Ejemplo n.º 1
0
    //プレイヤー強化
    void PowerUp()
    {
        if (!Input.GetKeyDown(KeyCode.X))
        {
            return;
        }
        if (conditionArray[powerUpPoint])
        {
            return;
        }

        switch (powerUpPoint)
        {
        case 1:
            playerMove.SetSpeed(2f);
            break;

        case 2:
            bulletGenerate.SetShotTime(0.07f);
            break;

        case 3:
            tripleShot.SetTriple(true);
            break;

        case 4:
            razer.SetRazer(true);
            break;

        case 5:
            floatingBullet.GenerateOption();
            break;

        default:
            Debug.LogError("PowerUpError");
            break;
        }
        if (!isAllUp)
        {
            if (powerUpPoint == 4)
            {
                tripleShot.SetTriple(false);
            }
            else if (powerUpPoint == 3)
            {
                razer.SetRazer(false);
            }
        }

        audioSource.PlayOneShot(effect);
        powerUpPoint = 0;
        ConditionArrayUpdate();
    }
Ejemplo n.º 2
0
    private void Start()
    {
        bulletGenerate = GetComponent <BulletGenerate>();
        floatingBullet = GetComponent <FloatingBullet>();
        tripleShot     = GetComponent <TripleShot>();
        playerMove     = GetComponent <PlayerMove>();
        audioSource    = GetComponent <AudioSource>();
        conditionArray = new bool[maxPoint + 1];
        Initialize();

        if (conami.GetConami())
        {
            isAllUp = true;
            tripleShot.SetTriple(true);
            razer.SetRazer(true);
            for (int i = 0; i < floatingBullet.GetMaxCount(); i++)
            {
                floatingBullet.GenerateOption();
            }
            ConditionArrayUpdate();
        }
    }