mirror of
https://github.com/ConjureETS/PixelSphinx.git
synced 2026-03-24 02:20:58 +00:00
starting asteroid
This commit is contained in:
parent
af49edb376
commit
7fbc9e1d4e
26
Assets/Asteroid.cs
Normal file
26
Assets/Asteroid.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using UnityEngine;
|
||||
using System.Collections;
|
||||
|
||||
public class Asteroid : MonoBehaviour
|
||||
{
|
||||
Vector3 center;
|
||||
public float speed;
|
||||
public float step;
|
||||
|
||||
// Use this for initialization
|
||||
void Start () {
|
||||
center = new Vector3(0, 0);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update () {
|
||||
MoveObject(center);
|
||||
|
||||
}
|
||||
|
||||
void MoveObject(Vector3 center)
|
||||
{
|
||||
step = speed * Time.deltaTime;
|
||||
this.transform.position = Vector3.MoveTowards(transform.position, center, step);
|
||||
}
|
||||
}
|
||||
12
Assets/Asteroid.cs.meta
Normal file
12
Assets/Asteroid.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 025c26020d5e62f40be0e8a2d063c51b
|
||||
timeCreated: 1460088774
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2a2a40279929a214db32fd8ec2e94b23
|
||||
folderAsset: yes
|
||||
timeCreated: 1460086249
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,9 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: c8a47bc917a8b874eabaca4e75369948
|
||||
folderAsset: yes
|
||||
timeCreated: 1460086241
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
19
Assets/SpawnAsteroids.cs
Normal file
19
Assets/SpawnAsteroids.cs
Normal file
@ -0,0 +1,19 @@
|
||||
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 () {
|
||||
|
||||
}
|
||||
}
|
||||
12
Assets/SpawnAsteroids.cs.meta
Normal file
12
Assets/SpawnAsteroids.cs.meta
Normal file
@ -0,0 +1,12 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 665432c96ca23f140a869ed98ade0dde
|
||||
timeCreated: 1460092006
|
||||
licenseType: Free
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,7 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3c5f064c6cc9dad4d942c7175ca62bf8
|
||||
guid: eaff437385965f0409ef60dcab46e52a
|
||||
folderAsset: yes
|
||||
timeCreated: 1460086225
|
||||
timeCreated: 1460088152
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
|
||||
BIN
Assets/_Scenes/sophieScene.unity
Normal file
BIN
Assets/_Scenes/sophieScene.unity
Normal file
Binary file not shown.
@ -1,7 +1,6 @@
|
||||
fileFormatVersion: 2
|
||||
guid: e7cc8537ea5a6bf4b844573c98dc567e
|
||||
folderAsset: yes
|
||||
timeCreated: 1460086265
|
||||
guid: 7ea0c30ed16d86641a0b486375c97c1a
|
||||
timeCreated: 1460091128
|
||||
licenseType: Free
|
||||
DefaultImporter:
|
||||
userData:
|
||||
BIN
Assets/m_asteroid.mat
Normal file
BIN
Assets/m_asteroid.mat
Normal file
Binary file not shown.
8
Assets/m_asteroid.mat.meta
Normal file
8
Assets/m_asteroid.mat.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 373eeb9894b74ec43b7157c541d7cde8
|
||||
timeCreated: 1460088680
|
||||
licenseType: Free
|
||||
NativeFormatImporter:
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user