@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: ee53c6458e8c16a4697d1d668c481132 | |||
folderAsset: yes | |||
DefaultImporter: | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 502 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: e73daafd87f356a418683d515f657f1e | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 502 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 5596d3ad400eb0f4a96bcfd82701418e | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 503 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 691eeb796e44ae84498ffaf4c8613b03 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 11400000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,126 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!21 &2100000 | |||
Material: | |||
serializedVersion: 8 | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_Name: Temp_Roots | |||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} | |||
m_ValidKeywords: [] | |||
m_InvalidKeywords: [] | |||
m_LightmapFlags: 4 | |||
m_EnableInstancingVariants: 0 | |||
m_DoubleSidedGI: 0 | |||
m_CustomRenderQueue: -1 | |||
stringTagMap: | |||
RenderType: Opaque | |||
disabledShaderPasses: [] | |||
m_SavedProperties: | |||
serializedVersion: 3 | |||
m_TexEnvs: | |||
- _BaseMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _BumpMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _DetailAlbedoMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _DetailMask: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _DetailNormalMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _EmissionMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _MainTex: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _MetallicGlossMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _OcclusionMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _ParallaxMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _SpecGlossMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- unity_Lightmaps: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- unity_LightmapsInd: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- unity_ShadowMasks: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
m_Ints: [] | |||
m_Floats: | |||
- _AlphaClip: 0 | |||
- _Blend: 0 | |||
- _BumpScale: 1 | |||
- _ClearCoatMask: 0 | |||
- _ClearCoatSmoothness: 0 | |||
- _Cull: 2 | |||
- _Cutoff: 0.5 | |||
- _DetailAlbedoMapScale: 1 | |||
- _DetailNormalMapScale: 1 | |||
- _DstBlend: 0 | |||
- _EnvironmentReflections: 1 | |||
- _GlossMapScale: 0 | |||
- _Glossiness: 0 | |||
- _GlossyReflections: 0 | |||
- _Metallic: 0 | |||
- _OcclusionStrength: 1 | |||
- _Parallax: 0.005 | |||
- _QueueOffset: 0 | |||
- _ReceiveShadows: 1 | |||
- _Smoothness: 0.5 | |||
- _SmoothnessTextureChannel: 0 | |||
- _SpecularHighlights: 1 | |||
- _SrcBlend: 1 | |||
- _Surface: 0 | |||
- _WorkflowMode: 1 | |||
- _ZWrite: 1 | |||
m_Colors: | |||
- _BaseColor: {r: 0.41509432, g: 0.3191527, b: 0.3191527, a: 1} | |||
- _Color: {r: 0.4150943, g: 0.31915268, b: 0.31915268, a: 1} | |||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} | |||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | |||
m_BuildTextureStacks: [] | |||
--- !u!114 &1965910498812406061 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 11 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
version: 5 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 283a9b49743835744b8bd20b4eeb1704 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 2100000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,129 @@ | |||
%YAML 1.1 | |||
%TAG !u! tag:unity3d.com,2011: | |||
--- !u!21 &2100000 | |||
Material: | |||
serializedVersion: 8 | |||
m_ObjectHideFlags: 0 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_Name: Temp_Water | |||
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3} | |||
m_ValidKeywords: | |||
- _SURFACE_TYPE_TRANSPARENT | |||
m_InvalidKeywords: [] | |||
m_LightmapFlags: 4 | |||
m_EnableInstancingVariants: 0 | |||
m_DoubleSidedGI: 0 | |||
m_CustomRenderQueue: 3000 | |||
stringTagMap: | |||
RenderType: Transparent | |||
disabledShaderPasses: | |||
- DepthOnly | |||
- SHADOWCASTER | |||
m_SavedProperties: | |||
serializedVersion: 3 | |||
m_TexEnvs: | |||
- _BaseMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _BumpMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _DetailAlbedoMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _DetailMask: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _DetailNormalMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _EmissionMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _MainTex: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _MetallicGlossMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _OcclusionMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _ParallaxMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- _SpecGlossMap: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- unity_Lightmaps: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- unity_LightmapsInd: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
- unity_ShadowMasks: | |||
m_Texture: {fileID: 0} | |||
m_Scale: {x: 1, y: 1} | |||
m_Offset: {x: 0, y: 0} | |||
m_Ints: [] | |||
m_Floats: | |||
- _AlphaClip: 0 | |||
- _Blend: 0 | |||
- _BumpScale: 1 | |||
- _ClearCoatMask: 0 | |||
- _ClearCoatSmoothness: 0 | |||
- _Cull: 2 | |||
- _Cutoff: 0.5 | |||
- _DetailAlbedoMapScale: 1 | |||
- _DetailNormalMapScale: 1 | |||
- _DstBlend: 10 | |||
- _EnvironmentReflections: 1 | |||
- _GlossMapScale: 0 | |||
- _Glossiness: 0 | |||
- _GlossyReflections: 0 | |||
- _Metallic: 0 | |||
- _OcclusionStrength: 1 | |||
- _Parallax: 0.005 | |||
- _QueueOffset: 0 | |||
- _ReceiveShadows: 1 | |||
- _Smoothness: 0.5 | |||
- _SmoothnessTextureChannel: 0 | |||
- _SpecularHighlights: 1 | |||
- _SrcBlend: 5 | |||
- _Surface: 1 | |||
- _WorkflowMode: 1 | |||
- _ZWrite: 0 | |||
m_Colors: | |||
- _BaseColor: {r: 0.16353682, g: 0.7075471, b: 0.58599836, a: 0.6862745} | |||
- _Color: {r: 0.16353679, g: 0.7075471, b: 0.58599836, a: 0.6862745} | |||
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1} | |||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1} | |||
m_BuildTextureStacks: [] | |||
--- !u!114 &6038255767948181957 | |||
MonoBehaviour: | |||
m_ObjectHideFlags: 11 | |||
m_CorrespondingSourceObject: {fileID: 0} | |||
m_PrefabInstance: {fileID: 0} | |||
m_PrefabAsset: {fileID: 0} | |||
m_GameObject: {fileID: 0} | |||
m_Enabled: 1 | |||
m_EditorHideFlags: 0 | |||
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3} | |||
m_Name: | |||
m_EditorClassIdentifier: | |||
version: 5 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 470e8026ac5930b47a91f7a68eb28564 | |||
NativeFormatImporter: | |||
externalObjects: {} | |||
mainObjectFileID: 2100000 | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 118408 |
@ -0,0 +1,7 @@ | |||
fileFormatVersion: 2 | |||
guid: 5a657d33dc568354fb19434ed2d422f4 | |||
PrefabImporter: | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 118434 |
@ -0,0 +1,7 @@ | |||
fileFormatVersion: 2 | |||
guid: aee91d9e9e533ae48a241c35e7d37e4b | |||
PrefabImporter: | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 118419 |
@ -0,0 +1,7 @@ | |||
fileFormatVersion: 2 | |||
guid: 9963b2a917f0e6946a7f8a8eecd0a128 | |||
PrefabImporter: | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 24771 |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: ebb262dd1a24b8b42bbe8dca4e252c5f | |||
folderAsset: yes | |||
DefaultImporter: | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,35 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using UnityEngine; | |||
public class CubeTestController : MonoBehaviour | |||
{ | |||
[SerializeField] | |||
private float forwardSpeed = 1; | |||
[SerializeField] | |||
private float turningSpeed = 90; | |||
// Start is called before the first frame update | |||
void Start() | |||
{ | |||
} | |||
// Update is called once per frame | |||
void Update() | |||
{ | |||
Vector3 _pos = transform.position; | |||
_pos += transform.forward * forwardSpeed * Time.deltaTime; | |||
if (Input.GetKey(KeyCode.A)) | |||
transform.Rotate(new Vector3(0, -turningSpeed * Time.deltaTime, 0)); | |||
if (Input.GetKey(KeyCode.D)) | |||
transform.Rotate(new Vector3(0, turningSpeed * Time.deltaTime, 0)); | |||
transform.position = _pos; | |||
} | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: b19bb84870e0cd64c8cd718538e99c70 | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,8 @@ | |||
fileFormatVersion: 2 | |||
guid: 00d02ed81f47bb34a829104718f21cfb | |||
folderAsset: yes | |||
DefaultImporter: | |||
externalObjects: {} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,12 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using UnityEditor; | |||
using UnityEngine; | |||
[CreateAssetMenu(menuName = "FREG/Tile")] | |||
public class TileData : ScriptableObject | |||
{ | |||
public TileManager.TileTypes tileType; | |||
public GameObject prefab; | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: c87950ceeb842a34581902656d7326ca | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,19 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using UnityEngine; | |||
public class TileController : MonoBehaviour | |||
{ | |||
public Transform entryAnchor; | |||
public Transform exitAnchor; | |||
private void OnTriggerExit(Collider other) | |||
{ | |||
if(other.transform.Equals(Camera.main.transform)) | |||
{ | |||
Destroy(gameObject, 1f); | |||
} | |||
} | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: 1ec15107144f71a4d98d61d7abead851 | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
@ -0,0 +1,77 @@ | |||
using System.Collections; | |||
using System.Collections.Generic; | |||
using UnityEngine; | |||
public class TileManager : MonoBehaviour | |||
{ | |||
[SerializeField] | |||
private List<TileData> m_tileList = new List<TileData>(); | |||
[SerializeField] | |||
private Transform m_camTransform; | |||
private int m_bendProfile = 0; | |||
private TileController m_previousTile; | |||
private TileController m_currentTile; | |||
public enum TileTypes | |||
{ | |||
BEND_LEFT = -1, | |||
STRAIGHT = 0, | |||
BEND_RIGHT = 1, | |||
}; | |||
private void Start() | |||
{ | |||
m_currentTile = FindObjectOfType<TileController>(); | |||
} | |||
// Update is called once per frame | |||
void Update() | |||
{ | |||
/* | |||
if (m_previousTile != null) | |||
{ | |||
if (Vector3.Distance(m_previousTile.transform.position, Camera.main.transform.position) > m_exitCullDistance) | |||
{ | |||
Destroy(m_previousTile); | |||
m_previousTile = null; | |||
} | |||
} | |||
*/ | |||
if(Input.GetKeyDown(KeyCode.Space)) | |||
{ | |||
SpawnRandomTile(); | |||
} | |||
} | |||
void SpawnRandomTile() | |||
{ | |||
var _startBendProfile = m_bendProfile; | |||
TileData _selectedTile = new TileData(); | |||
do | |||
{ | |||
_selectedTile = m_tileList[Random.Range(0, m_tileList.Count - 1)]; | |||
} | |||
while (Mathf.Abs(m_bendProfile + (int)_selectedTile.tileType) >= 2); | |||
m_bendProfile += (int)_selectedTile.tileType; | |||
var _newTileObj = Instantiate(_selectedTile.prefab); | |||
_newTileObj.transform.forward = m_currentTile.exitAnchor.transform.forward; | |||
var _newTileController = _newTileObj.GetComponent<TileController>(); | |||
Vector3 _offset = m_currentTile.exitAnchor.position - _newTileController.entryAnchor.position; | |||
_newTileObj.transform.position += _offset; | |||
m_previousTile = m_currentTile; | |||
m_currentTile = _newTileController; | |||
} | |||
} |
@ -0,0 +1,11 @@ | |||
fileFormatVersion: 2 | |||
guid: d240feb2a64097847b315cfebb7441ec | |||
MonoImporter: | |||
externalObjects: {} | |||
serializedVersion: 2 | |||
defaultReferences: [] | |||
executionOrder: 0 | |||
icon: {instanceID: 0} | |||
userData: | |||
assetBundleName: | |||
assetBundleVariant: |
size 1200 |