//List<int> leftPos = new List<int>(); //List<int> rightPos = new List<int>(); //float buildingFallVelocity = 10; //// to allow use of coroutines in non-monobehavior scripts //public void StartShootTimer() //{ // StartCoroutine("ShootTimer"); //} //IEnumerator ShootTimer() //{ // if(!player.canShoot) // { // yield return new WaitForSeconds(0.15f); // player.canShoot = true; // } //} void Start() { Application.targetFrameRate = -1; physics = new CustomPhysics(); // initialize the physics rayCast = new CustomRayCast(); rayCast.pD = this; //explode = new Explode (); explode.pD = this; //player = new Player (-100, 500); // create the player //ourPlayerAnimation.X = player.x; //ourPlayerAnimation.Y = player.y; //ourPlayerAnimation.Enabled = true; //player.pD = this; //player.physics = physics; //physics.Add (player); // Add player to physics //player.targetCamera = Camera.main.GetComponent<CameraFollow>(); //controls.player = player; //controls = new Controls(this, physics); //int minX = this.World.Minimum.x; //int maxX = this.World.Maximum.x; //for (int y = this.World.Minimum.y; y < this.World.Maximum.y; y++) //{ // leftPos.Add(minX); // rightPos.Add(maxX); //} intializeCities(); }
public void Start() { physics = pD.physics; rayCast = pD.rayCast; //explode = dT.explode; }