Esempio n. 1
0
    protected virtual void OnTriggerEnter(Collider hit)
    {
        if (hit.gameObject.CompareTag("Bullet"))
        {
            k514BulletBridge tmp = hit.GetComponent <k514BulletBridge>();
            if (!tmp.isEnemyShot() && !tmp.GetOnceTrig())
            {
                tmp.DoInteract();
                if (!isBoss)
                {
                    k514SystemManager.EffectMgr.CastEffect(EFFECT_TYPE.HIT, transform.position + Vector3.up * 0.4f);
                }
                k514SystemManager.InteractMgr.GetPlayerTransform().GetComponent <k514PlayerController>().SCORE_STORAGE += Random.Range(30, 60);
                k514SystemManager.InteractMgr.GetPlayerTransform().GetComponent <k514PlayerController>().SP            += Random.Range(0.003f, 0.005f);
                this.DoInteract_HP(tmp.GetDamage());
            }
        }

        if (hit.gameObject.CompareTag("Bomb"))
        {
            Debug.Log("in!");
            k514MusouFuuin tmp2 = hit.GetComponent <k514MusouFuuin>();
            bombs_check.Add(tmp2.GetID(), tmp2);
        }
    }
Esempio n. 2
0
 protected void OnTriggerEnter(Collider hit)
 {
     if (hit.gameObject.CompareTag("Bullet") && !InvisibleTrig)
     {
         k514BulletBridge tmp = hit.gameObject.GetComponent <k514BulletBridge>();
         if (tmp.isEnemyShot() && !tmp.GetOnceTrig())
         {
             tmp.DoInteract();
             ZANKI--;
             InvisibleTrig = true;
             if (ZANKI < 0)
             {
                 StartCoroutine(GameOver());
             }
             else
             {
                 StartCoroutine(Invisible());
             }
             k514SystemManager.SoundMgr.PlayAudioClip(SFX_TYPE_BODY.PICHU);
             k514SystemManager.UI_SpecaMgr.Zanki_UI_Update();
             k514SystemManager.EffectMgr.CastEffect(EFFECT_TYPE.PHIT, transform.position + Vector3.up * 0.4f);
         }
     }
 }