Ejemplo n.º 1
0
 public bool PutLaserPrefab()
 {
     if (putLaserNum < putAbleLaserNum)
     {
         SEManager.PlayPutObjectSound0();
         GameObject laser = Instantiate(laserPrefab, shotBullet.transform.position, transform.rotation);
         laser.GetComponent <Laser>().SetPutter(this.GetComponent <PutObject>());
         putLaserNum++;
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
 public bool PutBatteryPrefab()
 {
     if (putBatteryNum < putAbleBatteryNum)
     {
         GameObject battery = Instantiate(batteryPrefab, new Vector3(shotBullet.transform.position.x, 0f, shotBullet.transform.position.z), transform.rotation);
         battery.GetComponent <DestroyTimeAgo>().SetPutter(this.GetComponent <PutObject>());
         battery.GetComponent <DestroyByAttack>().SetPutter(this.GetComponent <PutObject>());
         SEManager.PlayPutObjectSound0();
         putBatteryNum++;
         return(true);
     }
     return(false);
 }