Example #1
0
 public void PutRemoteBombPrefab()
 {
     if (!putBomb)
     {
         remoteBomb = (GameObject)Instantiate(remoteBombPrefab, new Vector3(shotBullet.transform.position.x, 0f, shotBullet.transform.position.z), Quaternion.identity);
         remoteBomb.GetComponent <RemoteController>().SetController(this.gameObject, shotBullet);
         SEManager.PlayPutBombSound();
         try
         {
             UseSkill us = this.transform.parent.transform.gameObject.GetComponent <UseSkill>();
             us.SetSkillCountTime(9f);
         }
         catch
         {
         }
     }
     else
     {
         SEManager.PlayBombSound();
         GameObject Explosion = (GameObject)Instantiate(remoteBombExplosionPrefab, remoteBomb.transform.position, Quaternion.identity);
         Destroy(remoteBomb);
         Destroy(Explosion, 0.5f);
     }
     putBomb = !putBomb;
 }
Example #2
0
 public void explosionX()
 {
     if (!isBomb)
     {
         SEManager.PlayBombSound();
         explosion[0] = (GameObject)Instantiate(explosionPrefab, transform.position + new Vector3((distancePX - distanceNX) / 2, 0f, 0f), Quaternion.identity);
         explosion[0].transform.localScale = new Vector3(distancePX + distanceNX, 2f, 2f);
     }
 }
Example #3
0
    public void Bomb()
    {
        try
        {
            po.LandMineBomb();
        }
        catch (MissingReferenceException)
        {
        }
        SEManager.PlayBombSound();
        GameObject Explosion = (GameObject)Instantiate(explosionPrefab, this.transform.position, Quaternion.identity);

        this.gameObject.SetActive(false);
        Destroy(Explosion, 0.5f);
        Destroy(this.gameObject, 0.6f);
    }