mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-24 02:20:58 +00:00
starting spawn asteroid
This commit is contained in:
parent
4810867fae
commit
8b8de8b58a
BIN
Assets/Prefabs/Asteroid.prefab
Normal file
BIN
Assets/Prefabs/Asteroid.prefab
Normal file
Binary file not shown.
8
Assets/Prefabs/Asteroid.prefab.meta
Normal file
8
Assets/Prefabs/Asteroid.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: cc1a204562630cd40a1dd685b5ed8e6e
|
||||
timeCreated: 1460093261
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
9
Assets/Scripts.meta
Normal file
9
Assets/Scripts.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f0123460f54262d43bd494bf9cbc0126
|
||||
folderAsset: yes
|
||||
timeCreated: 1460093246
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
25
Assets/Scripts/SpawnAsteroids.cs
Normal file
25
Assets/Scripts/SpawnAsteroids.cs
Normal 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
9
Assets/Sounds.meta
Normal file
@ -0,0 +1,9 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 043c9d3c0b79fd64b9d82d520495597e
|
||||
folderAsset: yes
|
||||
timeCreated: 1460093246
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -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.
Loading…
x
Reference in New Issue
Block a user