Inheritance: MonoBehaviour
Exemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     instance = this;
     xScale = TheCamera.ViewportToWorldPoint(new Vector3(1-Settings.SHIP_SCREEN_PADDING, 0, Settings.CAMERA_DISTANCE_FROM_SHIP)).x;
     offsetX = (xScale * (Settings.ASTEROID_SPREAD-1))/2.0f;
     xScale *= 1.0f;
     numOfPowerUps = 0;
 }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     instance      = this;
     xScale        = TheCamera.ViewportToWorldPoint(new Vector3(1 - Settings.SHIP_SCREEN_PADDING, 0, Settings.CAMERA_DISTANCE_FROM_SHIP)).x;
     offsetX       = (xScale * (Settings.ASTEROID_SPREAD - 1)) / 2.0f;
     xScale       *= 1.0f;
     numOfPowerUps = 0;
 }
Exemplo n.º 3
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else if (instance != this)
     {
         Destroy(this.gameObject);
     }
 }