starting spawn asteroid

This commit is contained in:
Sophie 2016-04-08 01:54:33 -04:00
parent 4810867fae
commit 8b8de8b58a
10 changed files with 51 additions and 19 deletions

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cc1a204562630cd40a1dd685b5ed8e6e
timeCreated: 1460093261
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

9
Assets/Scripts.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: f0123460f54262d43bd494bf9cbc0126
folderAsset: yes
timeCreated: 1460093246
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,25 @@
using UnityEngine;
using System.Collections;
public class SpawnAsteroids : MonoBehaviour {
public GameObject myAsteroid;
public Vector3 initialPosition;
// Use this for initialization
void Start () {
InvokeRepeating("Spawn", 0, 0.5F);
}
// Update is called once per frame
void Update () {
}
void Spawn()
{
GameObject instance = Instantiate(myAsteroid);
instance.transform.position = new Vector3(10, 10, 0);
}
}

9
Assets/Sounds.meta Normal file
View File

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 043c9d3c0b79fd64b9d82d520495597e
folderAsset: yes
timeCreated: 1460093246
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,19 +0,0 @@
using UnityEngine;
using System.Collections;
public class SpawnAsteroids : MonoBehaviour {
public bool doSpawn;
// Use this for initialization
void Start () {
doSpawn = true;
InvokeRepeating("LaunchProjectile", 0, 0.4F);
}
// Update is called once per frame
void Update () {
}
}

Binary file not shown.