folders! prep to take the control out of rig
This commit is contained in:
parent
53c6027e7c
commit
0a7f98b4d2
44 changed files with 180 additions and 75 deletions
8
Assets/Scripts/Logic.meta
Normal file
8
Assets/Scripts/Logic.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bda3fde8d921a4948a2cf1f839816627
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/Logic/Control.meta
Normal file
8
Assets/Scripts/Logic/Control.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7cd11a47c5c25664fb9ebb7a87d3bfb2
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
29
Assets/Scripts/Logic/Control/Control.cs
Normal file
29
Assets/Scripts/Logic/Control/Control.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class Control
|
||||
{
|
||||
[HideInInspector]
|
||||
public Logic logic;
|
||||
|
||||
public void Set(InspectorSetter setter)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Fetch(InspectorSetter setter)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Start(Logic logic)
|
||||
{
|
||||
this.logic = logic;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0398ec04026615b42bcd4362f03041ca
|
||||
guid: 06dfe74aa9d30a84681f5b16806b4e75
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
18
Assets/Scripts/Logic/Control/OculusFilter.cs
Normal file
18
Assets/Scripts/Logic/Control/OculusFilter.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class OculusBS : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
Assets/Scripts/Logic/Control/OculusFilter.cs.meta
Normal file
11
Assets/Scripts/Logic/Control/OculusFilter.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 48ad6fd1dd746bd47bed8f1e343717d8
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
18
Assets/Scripts/Logic/Control/ValveFilter.cs
Normal file
18
Assets/Scripts/Logic/Control/ValveFilter.cs
Normal file
|
@ -0,0 +1,18 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ValveFilter : MonoBehaviour
|
||||
{
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
Assets/Scripts/Logic/Control/ValveFilter.cs.meta
Normal file
11
Assets/Scripts/Logic/Control/ValveFilter.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 437205472051c9b49b7ca818824beb05
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -7,25 +7,28 @@ public class Logic
|
|||
[HideInInspector]
|
||||
public Monolith mono;
|
||||
|
||||
public Control control;
|
||||
public World world;
|
||||
public Rig rig;
|
||||
|
||||
// [Header("Variables")]
|
||||
|
||||
// public World world; Snake snake; public Box box; public
|
||||
|
||||
public void Set(InspectorSetter setter)
|
||||
{
|
||||
rig.Set(setter);
|
||||
world.Set(setter);
|
||||
}
|
||||
|
||||
public void Fetch(InspectorSetter setter)
|
||||
{
|
||||
rig.Fetch(setter);
|
||||
world.Fetch(setter);
|
||||
}
|
||||
|
||||
public void Start(Monolith mono)
|
||||
{
|
||||
this.mono = mono;
|
||||
|
||||
rig.Start(this);
|
||||
world.Start(this);
|
||||
}
|
||||
|
||||
public void Update()
|
8
Assets/Scripts/Logic/World.meta
Normal file
8
Assets/Scripts/Logic/World.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 327a22a5e4aa834499784e52024aad8b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -6,7 +6,7 @@ using UnityEngine.XR;
|
|||
public class Rig
|
||||
{
|
||||
[HideInInspector]
|
||||
public Monolith mono;
|
||||
public Logic logic;
|
||||
|
||||
[Header("Design")]
|
||||
public float scale;
|
||||
|
@ -46,9 +46,10 @@ public class Rig
|
|||
|
||||
public bool alignRecordCam;
|
||||
|
||||
public void Start()
|
||||
public void Start(Logic logic)
|
||||
{
|
||||
Game.OnBump += Bump;
|
||||
this.logic = logic;
|
||||
Game.OnBump += Bump; // replace these systems...
|
||||
Game.OnCrash += Bump;
|
||||
|
||||
recordCam.gameObject.SetActive(Application.isEditor);
|
29
Assets/Scripts/Logic/World/World.cs
Normal file
29
Assets/Scripts/Logic/World/World.cs
Normal file
|
@ -0,0 +1,29 @@
|
|||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
[Serializable]
|
||||
public class World
|
||||
{
|
||||
[HideInInspector]
|
||||
public Logic logic;
|
||||
|
||||
public void Set(InspectorSetter setter)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Fetch(InspectorSetter setter)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Start(Logic logic)
|
||||
{
|
||||
this.logic = logic;
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
Assets/Scripts/Logic/World/World.cs.meta
Normal file
11
Assets/Scripts/Logic/World/World.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e1aa34bff9eb7a143a7857a739ebf8e3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,66 +0,0 @@
|
|||
using UnityEngine;
|
||||
using UnityEditor;
|
||||
using NaughtyAttributes;
|
||||
|
||||
#if UNITY_EDITOR
|
||||
public class Painter : MonoBehaviour
|
||||
{
|
||||
// public Texture3D texture;
|
||||
// public Color left, right, bottom, top, back, front;
|
||||
|
||||
// [Button]
|
||||
// void LoadTexture()
|
||||
// {
|
||||
// left = texture.GetPixel(0, 1, 1);
|
||||
// right = texture.GetPixel(2, 1, 1);
|
||||
|
||||
// bottom = texture.GetPixel(1, 0, 1);
|
||||
// top = texture.GetPixel(1, 2, 1);
|
||||
|
||||
// back = texture.GetPixel(1, 1, 0);
|
||||
// front = texture.GetPixel(1, 1, 2);
|
||||
// }
|
||||
|
||||
// [Button]
|
||||
// void UpdateTexture()
|
||||
// {
|
||||
// texture.SetPixel(0, 1, 1, left);
|
||||
// texture.SetPixel(2, 1, 1, right);
|
||||
|
||||
// texture.SetPixel(1, 0, 1, bottom);
|
||||
// texture.SetPixel(1, 2, 1, top);
|
||||
|
||||
// texture.SetPixel(1, 1, 0, back);
|
||||
// texture.SetPixel(1, 1, 2, front);
|
||||
|
||||
// texture.Apply();
|
||||
// AssetDatabase.CreateAsset(texture, "Assets/Materials/" + texture.name + ".asset");
|
||||
// }
|
||||
|
||||
// [Button]
|
||||
// public void NewTexture()
|
||||
// {
|
||||
// // 3D texture for normal indexed colors
|
||||
// Texture3D normalColors = new Texture3D(3, 3, 3, TextureFormat.RGBA32, false);
|
||||
// normalColors.filterMode = FilterMode.Point;
|
||||
// normalColors.wrapMode = TextureWrapMode.Clamp;
|
||||
// normalColors.anisoLevel = 0;
|
||||
|
||||
// Color[] colorArray = new Color[3 * 3 * 3];
|
||||
|
||||
// colorArray[4] = Color.blue; // Back
|
||||
// colorArray[22] = Color.blue; // Forward
|
||||
|
||||
// colorArray[10] = Color.green; // Down
|
||||
// colorArray[16] = Color.green; // Up
|
||||
|
||||
// colorArray[12] = Color.red; // Left
|
||||
// colorArray[14] = Color.red; // Right
|
||||
|
||||
// normalColors.SetPixels(colorArray);
|
||||
// normalColors.Apply();
|
||||
|
||||
// AssetDatabase.CreateAsset(normalColors, "Assets/Materials/newTex.asset");
|
||||
// }
|
||||
}
|
||||
#endif
|
8
Assets/Scripts/Render.meta
Normal file
8
Assets/Scripts/Render.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 347514ec7ea634d45ac109a8fbb09fb1
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
8
Assets/Scripts/Render/Sound.meta
Normal file
8
Assets/Scripts/Render/Sound.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 61a442d648c4d7b408faeb512fe75f15
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in a new issue