Merge branch 'master' of github.com:ETSConjure/PixelSphinx

This commit is contained in:
Jean-Sébastien Gervais 2016-04-08 03:19:20 -04:00
commit 9d0bb4a70b
15 changed files with 123 additions and 8 deletions

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: e7cc8537ea5a6bf4b844573c98dc567e
guid: 96533e08f1684a4499d445c8fefb7b3e
folderAsset: yes
timeCreated: 1460086265
timeCreated: 1460093246
licenseType: Free
DefaultImporter:
userData:

Binary file not shown.

View File

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

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 2a2a40279929a214db32fd8ec2e94b23
guid: f0123460f54262d43bd494bf9cbc0126
folderAsset: yes
timeCreated: 1460086249
timeCreated: 1460093246
licenseType: Free
DefaultImporter:
userData:

View 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);
}
}

View 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:

View File

@ -0,0 +1,41 @@
using UnityEngine;
using System.Collections;
public class SpawnAsteroids : MonoBehaviour {
public GameObject myAsteroid;
Vector3 center;
float x;
float y;
float d;
// Use this for initialization
void Start()
{
center = new Vector3(0, 0);
d = 4;
InvokeRepeating("Spawn", 0, 0.5F);
}
// Update is called once per frame
void Update () {
}
void Spawn()
{
GameObject instance = Instantiate(myAsteroid);
instance.transform.position = getPositions();
}
Vector3 getPositions()
{
float theta = Random.Range(0F, 360F);
x = center.x - Mathf.Sin(theta) * d;
y = center.y - Mathf.Cos(theta) * d;
return new Vector3(x, y);
}
}

View 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:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: c8a47bc917a8b874eabaca4e75369948
guid: 043c9d3c0b79fd64b9d82d520495597e
folderAsset: yes
timeCreated: 1460086241
timeCreated: 1460093246
licenseType: Free
DefaultImporter:
userData:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 3c5f064c6cc9dad4d942c7175ca62bf8
guid: eaff437385965f0409ef60dcab46e52a
folderAsset: yes
timeCreated: 1460086225
timeCreated: 1460088152
licenseType: Free
DefaultImporter:
userData:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7ea0c30ed16d86641a0b486375c97c1a
timeCreated: 1460091128
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/m_asteroid.mat Normal file

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 373eeb9894b74ec43b7157c541d7cde8
timeCreated: 1460088680
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.