1
0

Early version of Platforms (x1, x2, x4) and sprite changes for all -Caleb

And Don added something to the GameManager.cs
This commit is contained in:
new-00-0ne 2016-01-30 02:38:33 -05:00
parent ca5dc03c4f
commit 17c4fdf5ef
16 changed files with 101 additions and 3 deletions

View File

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

Binary file not shown.

View File

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

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 123a3302024907640b1eacd26c56b491
timeCreated: 1454130783
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 85e93861e3c44054ab770f5c292bb137
timeCreated: 1454130735
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 72a1b0a7d41c0424083f12b50eaa8b53
timeCreated: 1454122295
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: b429bbc6158b76c4dbab3e6bf3519827
guid: 3fa83265e1d3e234db4e457a26505779
folderAsset: yes
timeCreated: 1454119671
timeCreated: 1454123185
licenseType: Free
DefaultImporter:
userData:

View File

@ -15,6 +15,7 @@ public class GameManager : MonoBehaviour
{
if (gManager == null)
{
DontDestroyOnLoad(gameObject);
gManager = this;
iManager = new InputManager(0.1f, 0.2f);
tagged_objects = GameObject.FindGameObjectsWithTag("Scene_Object");

View File

@ -0,0 +1,44 @@
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
[ExecuteInEditMode]
public class Platform : MonoBehaviour
{
public Sprite sprite;
public int addNum;
public GameObject prefab;
public bool isParent = true;
int oldNum = 0;
// Update is called once per frame
void Update ()
{
//Updates all of the children's SpriteRender sprites
foreach (SpriteRenderer i in GetComponentsInChildren<SpriteRenderer>())
{
i.sprite = sprite;
}
/*Vector3 curPos = this.transform.position;
float scaleX = this.transform.lossyScale.x;
if (this.gameObject.transform.childCount < addNum && !Application.isPlaying && isParent)
{
for (int i = 0; i < addNum - oldNum; i++)
{
curPos = curPos + new Vector3(scaleX, 0);
GameObject childObj = Instantiate(prefab, curPos, Quaternion.identity) as GameObject;
childObj.GetComponent<Platform>().isParent = false;
childObj.transform.parent = transform;
curPos = childObj.transform.position;
transform.GetChild(transform.childCount);
}
for (int i = 0; i < oldNum - addNum; i++)
{
Destroy(transform.GetChild(transform.childCount));
}
oldNum = addNum;
}*/
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: a62f48d093e14da4688460ed30cf5da0
timeCreated: 1454130969
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

Binary file not shown.

View File

@ -1,2 +1,2 @@
m_EditorVersion: 5.3.1f1
m_EditorVersion: 5.3.2f1
m_StandardAssetsVersion: 0