// Use this for initialization
 void Start()
 {
     anim = GetComponent<Animator>();
     anim.SetBool ("open", false);
     one = GameObject.Find ("Sphere").GetComponentInChildren<Laser> ();
     two = GameObject.Find ("Sphere 1").GetComponentInChildren<Laser2> ();
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     playArea     = GetComponent <RectTransform> ();
     rigid2D      = GetComponent <Rigidbody2D> ();
     respawnCoin1 = GetComponent <RespawnCoin1> ();
     laser1       = GetComponent <Laser1> ();
     laser2       = GetComponent <Laser2> ();
     width        = playArea.rect.width;
     height       = playArea.rect.height;
     maxX         = width / 2;
     maxY         = height / 2;
     xPos         = playArea.rect.x;
     yPos         = playArea.rect.y;
 }
示例#3
0
 public static void setLaser2Bounds()
 {
     Laser2.respawnLaser(maxX, maxY, xPos, yPos);
 }