Exemplo n.º 1
0
 //
 //解决人物站在炸弹上时,isTrigger为true,无法被fire引爆
 //
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.tag == "fire")
     {
         BombExplosion(this.gameObject, gobj_fire);
         WhenBombExplosion -= new WhenBombExplosionEventHandler(StartBombExplosion);
     }
 }
Exemplo n.º 2
0
 void OnCollisionEnter2D(Collision2D collision)
 {
     //Debug.Log(collision.collider.tag);
     if (collision.collider.tag == "fire")
     {
         BombExplosion(this.gameObject, gobj_fire);
         WhenBombExplosion -= new WhenBombExplosionEventHandler(StartBombExplosion);
     }
 }
Exemplo n.º 3
0
    IEnumerator Bommm()
    {
        yield return(new WaitForSeconds(bombseconds));

        BombExplosion(this.gameObject, gobj_fire);
        WhenBombExplosion -= new WhenBombExplosionEventHandler(StartBombExplosion);

        /*
         * Destroy(this.gameObject);
         *      F_fire.InsFire (go_fire);
         * playerControl.CanBomb --;
         */
    }
Exemplo n.º 4
0
 //private Fire fire_touch_bomb;
 // public GameObject bomb;
 private void Awake()
 {
     WhenBombExplosion += new WhenBombExplosionEventHandler(StartBombExplosion);
     FirPower           = new playerControl();
 }