mirror of
https://github.com/ConjureETS/MeltedBananasOJam2016.git
synced 2026-03-24 02:21:06 +00:00
Fix and stuff antoine
This commit is contained in:
parent
4b3d7c2878
commit
2a2b274379
Binary file not shown.
Binary file not shown.
8
Assets/Prefabs/Tile.prefab.meta
Normal file
8
Assets/Prefabs/Tile.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b7c19bde0cdbe0a449b341fe1d6db17b
|
||||||
|
timeCreated: 1466884752
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
8
Assets/Prefabs/TileTrap.prefab.meta
Normal file
8
Assets/Prefabs/TileTrap.prefab.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 26a13cd54ea77304d851771c1c7cdcfe
|
||||||
|
timeCreated: 1466884752
|
||||||
|
licenseType: Free
|
||||||
|
NativeFormatImporter:
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -2,16 +2,23 @@
|
|||||||
using System.Collections;
|
using System.Collections;
|
||||||
[ExecuteInEditMode]
|
[ExecuteInEditMode]
|
||||||
public class FloorTileGenerator : MonoBehaviour {
|
public class FloorTileGenerator : MonoBehaviour {
|
||||||
|
public bool Generated = false;
|
||||||
|
public bool TileStartFalling;
|
||||||
public GameObject tile;
|
public GameObject tile;
|
||||||
public int x;
|
public int x;
|
||||||
public int y;
|
public int y;
|
||||||
|
public int rowFalling = 0;
|
||||||
public GameObject[] floorArray;
|
public GameObject[] floorArray;
|
||||||
//public GameObject[] testArray;
|
//public GameObject[] testArray;
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
void Start () {
|
void Start()
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
if(!Generated)
|
||||||
|
{
|
||||||
CreateFloor();
|
CreateFloor();
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
void CreateFloor()
|
void CreateFloor()
|
||||||
{
|
{
|
||||||
@ -21,7 +28,38 @@ public class FloorTileGenerator : MonoBehaviour {
|
|||||||
floorArray[i] = (GameObject)Instantiate(tile, new Vector3(i / y, 0, i % y), new Quaternion());
|
floorArray[i] = (GameObject)Instantiate(tile, new Vector3(i / y, 0, i % y), new Quaternion());
|
||||||
floorArray[i].name = i / y + "," + i % y;
|
floorArray[i].name = i / y + "," + i % y;
|
||||||
}
|
}
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
Generated = true;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
if (TileStartFalling)
|
||||||
|
{
|
||||||
|
RowFall(rowFalling);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void RowFall(int j)
|
||||||
|
{
|
||||||
|
for (int i = j*y; i < (j+1)*y; ++i)
|
||||||
|
{
|
||||||
|
((TileController)floorArray[i].GetComponent<TileController>()).wasTouched = true;
|
||||||
|
//Destroy(floorArray[i],1);
|
||||||
|
}
|
||||||
|
if (j>x)
|
||||||
|
{
|
||||||
|
++rowFalling;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void End()
|
||||||
|
{
|
||||||
|
#if UNITY_EDITOR
|
||||||
|
for (int i = 0; i < x * y; ++i)
|
||||||
|
{
|
||||||
|
Destroy(floorArray[i]);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,10 +1,11 @@
|
|||||||
fileFormatVersion: 2
|
fileFormatVersion: 2
|
||||||
guid: a2a093b34b4e3714293729a5a3c4bfb3
|
guid: a2a093b34b4e3714293729a5a3c4bfb3
|
||||||
timeCreated: 1466877393
|
timeCreated: 1466885732
|
||||||
licenseType: Free
|
licenseType: Free
|
||||||
MonoImporter:
|
MonoImporter:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
defaultReferences: []
|
defaultReferences:
|
||||||
|
- tile: {fileID: 122918, guid: 2479cecac8cfd2e4faf372505019532e, type: 2}
|
||||||
executionOrder: 0
|
executionOrder: 0
|
||||||
icon: {instanceID: 0}
|
icon: {instanceID: 0}
|
||||||
userData:
|
userData:
|
||||||
|
|||||||
12
Assets/Scripts/JumpingPlayer.cs.meta
Normal file
12
Assets/Scripts/JumpingPlayer.cs.meta
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: eab2a77c206aca744b77408a74d86ceb
|
||||||
|
timeCreated: 1466884750
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -38,7 +38,7 @@ public class PlayerController : MonoBehaviour {
|
|||||||
if (other.tag == "Trigger")
|
if (other.tag == "Trigger")
|
||||||
{
|
{
|
||||||
Debug.Log("Trigger entered");
|
Debug.Log("Trigger entered");
|
||||||
gameController.GetComponent<GameController>().fallTriggerActivated = true;
|
//gameController.GetComponent<GameController>().fallTriggerActivated = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
12
Assets/Scripts/PlayerController.cs.meta
Normal file
12
Assets/Scripts/PlayerController.cs.meta
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: cfb2f87d1e97ad046a368f2dde5c75a7
|
||||||
|
timeCreated: 1466884750
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@ -27,7 +27,7 @@ public class PostEffectScript : MonoBehaviour {
|
|||||||
}
|
}
|
||||||
else if (blindnessRatio >= 0.1f)
|
else if (blindnessRatio >= 0.1f)
|
||||||
{
|
{
|
||||||
blindnessRatio -= 0.01f;
|
blindnessRatio -= 0.05f;
|
||||||
blindness = 1 * blindnessRatio;
|
blindness = 1 * blindnessRatio;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
12
Assets/Scripts/TileController.cs.meta
Normal file
12
Assets/Scripts/TileController.cs.meta
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 7ab581e79e309c8458969c3963f1542b
|
||||||
|
timeCreated: 1466884750
|
||||||
|
licenseType: Free
|
||||||
|
MonoImporter:
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Loading…
x
Reference in New Issue
Block a user