Esempio n. 1
0
    // ** Update Functions **
    private void Start()
    {
        soundSource = GetComponent <LaserSound>();
        //actualLaser = gameObject.GetComponentInChildren<KillBeam>();
        actualLaser = gameObject.transform.Find("LaserBeam").GetComponent <KillBeam>();
        laserTimer  = gameObject.transform.Find("LaserCanvas").Find("LaserTimer").GetComponent <Image>();

        time = maxTime;
    }
Esempio n. 2
0
 private void LaserShoot()
 {
     lock (Bullets)
     {
         LaserSound.Play();
         LaserFired = true;
         var laser = new Laser
         {
             Shape =
             {
                 Position = Center,
                 Rotation = Sprite.Rotation
             }
         };
         Lasers.Add(laser);
     }
 }
Esempio n. 3
0
 void Awake()
 {
     source = GetComponent <LaserSound>();
 }
Esempio n. 4
0
 void OnTriggerEnter(Collider other)
 {
     LaserSound LaserSound = other.gameObject.GetComponent <LaserSound>();
 }