Commit 06caecbc authored by Nathan De Castro's avatar Nathan De Castro

backup 2

parent 864bebb6
...@@ -156,7 +156,7 @@ ...@@ -156,7 +156,7 @@
<None Include="Assets\Standard Assets\Effects\ImageEffects\Shaders\_BloomAndFlares\BlurAndFlares.shader" /> <None Include="Assets\Standard Assets\Effects\ImageEffects\Shaders\_BloomAndFlares\BlurAndFlares.shader" />
<None Include="Assets\Standard Assets\Effects\ImageEffects\Shaders\_BloomAndFlares\BlendForBloom.shader" /> <None Include="Assets\Standard Assets\Effects\ImageEffects\Shaders\_BloomAndFlares\BlendForBloom.shader" />
<Reference Include="Assembly-UnityScript"> <Reference Include="Assembly-UnityScript">
<HintPath>H:/Work/Listen/Library/ScriptAssemblies/Assembly-UnityScript.dll</HintPath> <HintPath>C:/Users/yuki/Desktop/Listen/Library/ScriptAssemblies/Assembly-UnityScript.dll</HintPath>
</Reference> </Reference>
<Reference Include="UnityEditor.Advertisements"> <Reference Include="UnityEditor.Advertisements">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Advertisements/Editor/UnityEditor.Advertisements.dll</HintPath> <HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/Advertisements/Editor/UnityEditor.Advertisements.dll</HintPath>
......
...@@ -95,3 +95,6 @@ ...@@ -95,3 +95,6 @@
4/25/2017 9:49:05 AM | unknown stopped after: 28 seconds 4/25/2017 9:49:05 AM | unknown stopped after: 28 seconds
4/25/2017 9:50:10 AM | unknown stopped after: 60 seconds 4/25/2017 9:50:10 AM | unknown stopped after: 60 seconds
4/25/2017 9:56:08 AM | unknown stopped after: 190 seconds 4/25/2017 9:56:08 AM | unknown stopped after: 190 seconds
4/28/2017 12:05:40 PM | unknown stopped after: 127 seconds
4/28/2017 12:11:52 PM | unknown stopped after: 14 seconds
4/28/2017 2:41:33 PM | unknown stopped after: 1 seconds
...@@ -21,15 +21,16 @@ public class GS : MonoBehaviour { ...@@ -21,15 +21,16 @@ public class GS : MonoBehaviour {
public bool lose_state = false; public bool lose_state = false;
private GameObject[] pickups; private GameObject[] pickups;
void Awake () { void Awake () {
i = this; i = this;
InvokeRepeating ("SpawnGhost", 30, 30);
//if (stay_on_scene) UnityEditor.SceneView.FocusWindowIfItsOpen (typeof (UnityEditor.SceneView)); //if (stay_on_scene) UnityEditor.SceneView.FocusWindowIfItsOpen (typeof (UnityEditor.SceneView));
player = GameObject.FindGameObjectWithTag ("Player"); player = GameObject.FindGameObjectWithTag ("Player");
//death_cam = GameObject.FindGameObjectWithTag ("Death Cam"); //death_cam = GameObject.FindGameObjectWithTag ("Death Cam");
} }
void Update () { void Update () {
if (Time.deltaTime > 60000) ghost.SetActive (true);
if (player) if (player)
if (!player.gameObject.activeSelf || lose_state) { if (!player.gameObject.activeSelf || lose_state) {
SceneManager.LoadScene ("Game"); SceneManager.LoadScene ("Game");
...@@ -45,4 +46,8 @@ public class GS : MonoBehaviour { ...@@ -45,4 +46,8 @@ public class GS : MonoBehaviour {
SceneManager.LoadScene (SceneManager.GetActiveScene ().name); SceneManager.LoadScene (SceneManager.GetActiveScene ().name);
} }
} }
void SpawnGhost () {
ghost.SetActive (!ghost.activeSelf);
}
} }
\ No newline at end of file
...@@ -7,26 +7,15 @@ public class VRMove : MonoBehaviour { ...@@ -7,26 +7,15 @@ public class VRMove : MonoBehaviour {
private float speed = 0.0f; private float speed = 0.0f;
public float max_speed = 0.04f; public float max_speed = 0.04f;
private bool colliding = false;
// Update is called once per frame // Update is called once per frame
void Update () { void Update () {
if (!colliding) { if (wand.pad_button_pressed) {
if (wand.pad_button_pressed) { if (speed <= max_speed) speed += 0.001f;
if (speed <= max_speed) speed += 0.001f; } else {
Vector3 translate_vector = new Vector3 (head.transform.forward.x, 0, head.transform.forward.z); if (speed >= 0) speed -= 0.0008f;
transform.Translate (translate_vector * speed, Space.World);
} else {
if (speed >= 0) speed -= 0.0008f;
}
} }
} Vector3 forward = new Vector3 (head.transform.forward.x, 0, head.transform.forward.z);
transform.Translate (forward * 0.09f * Time.deltaTime, Space.World);
void OnCollisionEnter (Collision coll) {
colliding = true;
}
void OnCollisionExit (Collision coll) {
colliding = false;
} }
} }
\ No newline at end of file
...@@ -5,14 +5,21 @@ public class WandController : MonoBehaviour { ...@@ -5,14 +5,21 @@ public class WandController : MonoBehaviour {
private Valve.VR.EVRButtonId trigger_button = Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger; private Valve.VR.EVRButtonId trigger_button = Valve.VR.EVRButtonId.k_EButton_SteamVR_Trigger;
private Valve.VR.EVRButtonId pad_button = Valve.VR.EVRButtonId.k_EButton_SteamVR_Touchpad; private Valve.VR.EVRButtonId pad_button = Valve.VR.EVRButtonId.k_EButton_SteamVR_Touchpad;
private Valve.VR.EVRButtonId sys_button = Valve.VR.EVRButtonId.k_EButton_ApplicationMenu; private Valve.VR.EVRButtonId sys_button = Valve.VR.EVRButtonId.k_EButton_ApplicationMenu;
private SteamVR_Controller.Device controller { get { return SteamVR_Controller.Input ((int) tracked_object.index); } }
private SteamVR_Controller.Device device { get { return SteamVR_Controller.Input ((int) tracked_object.index); } }
private SteamVR_TrackedObject tracked_object; private SteamVR_TrackedObject tracked_object;
private SteamVR_TrackedObject controller;
private GameObject pickup; private GameObject pickup;
public bool pad_button_pressed = false; public bool pad_button_pressed = false;
public bool sys_button_pressed = false; public bool sys_button_pressed = false;
public bool trigger_button_pressed = false; public bool trigger_button_pressed = false;
public float up = 0;
public float down = 0;
public float left = 0;
public float right = 0;
// Use this for initialization // Use this for initialization
void Start () { void Start () {
tracked_object = GetComponent<SteamVR_TrackedObject> (); tracked_object = GetComponent<SteamVR_TrackedObject> ();
...@@ -20,25 +27,36 @@ public class WandController : MonoBehaviour { ...@@ -20,25 +27,36 @@ public class WandController : MonoBehaviour {
// Update is called once per frame // Update is called once per frame
void Update () { void Update () {
if (controller == null) { if (device == null) {
Debug.Log ("Controller not initialized"); Debug.Log ("Controller not initialized");
return; return;
} }
pickup = PickedUpObject.pickup; pickup = PickedUpObject.pickup;
pad_button_pressed = controller.GetPress (pad_button); pad_button_pressed = device.GetPress (pad_button);
sys_button_pressed = controller.GetPressDown (sys_button); sys_button_pressed = device.GetPressDown (sys_button);
trigger_button_pressed = controller.GetPressDown (trigger_button); trigger_button_pressed = device.GetPressDown (trigger_button);
if (controller.GetPress (grip_button) && pickup != null) { if (device.GetPress (grip_button) && pickup != null) {
pickup.transform.parent = this.transform; pickup.transform.parent = this.transform;
pickup.GetComponent<Rigidbody> ().isKinematic = true; pickup.GetComponent<Rigidbody> ().isKinematic = true;
} else if(pickup != null){ } else if (pickup != null) {
pickup.GetComponent<Rigidbody> ().isKinematic = false; pickup.GetComponent<Rigidbody> ().isKinematic = false;
pickup.transform.parent = null; pickup.transform.parent = null;
}else{ } else {
return; return;
} }
if (device.GetAxis ().x != 0 || device.GetAxis ().y != 0) {
if (device.GetAxis ().y > 0) up = device.GetAxis ().y;
else up = 0;
if (device.GetAxis ().y < 0) down = device.GetAxis ().y;
else down = 0;
if (device.GetAxis ().x > 0) right = device.GetAxis ().x;
else left = 0;
if (device.GetAxis ().x < 0) left = device.GetAxis ().x;
else right = 0;
}
} }
} }
\ No newline at end of file
...@@ -38,7 +38,7 @@ RenderSettings: ...@@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1 m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0} m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 1549895649} m_Sun: {fileID: 1549895649}
m_IndirectSpecularColor: {r: 0.007369941, g: 0.010651721, b: 0.01558495, a: 1} m_IndirectSpecularColor: {r: 0.007387018, g: 0.010637774, b: 0.015593598, a: 1}
--- !u!157 &3 --- !u!157 &3
LightmapSettings: LightmapSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1461,6 +1461,21 @@ Transform: ...@@ -1461,6 +1461,21 @@ Transform:
m_Father: {fileID: 1554619529} m_Father: {fileID: 1554619529}
m_RootOrder: 70 m_RootOrder: 70
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &46895470 stripped
GameObject:
m_PrefabParentObject: {fileID: 124034, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
m_PrefabInternal: {fileID: 1214943819}
--- !u!114 &46895471
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 46895470}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: efea46735d252e341b44e4ba5066b6ba, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &48222813 --- !u!1 &48222813
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -5286,7 +5301,7 @@ Transform: ...@@ -5286,7 +5301,7 @@ Transform:
- {fileID: 1082856709} - {fileID: 1082856709}
- {fileID: 1842607151} - {fileID: 1842607151}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 4 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &158175023 --- !u!1 &158175023
GameObject: GameObject:
...@@ -5941,6 +5956,21 @@ MeshFilter: ...@@ -5941,6 +5956,21 @@ MeshFilter:
m_PrefabInternal: {fileID: 0} m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 176070397} m_GameObject: {fileID: 176070397}
m_Mesh: {fileID: 4301260, guid: 9a7b6a3a210579644a9556d013a2c35e, type: 3} m_Mesh: {fileID: 4301260, guid: 9a7b6a3a210579644a9556d013a2c35e, type: 3}
--- !u!1 &176644033 stripped
GameObject:
m_PrefabParentObject: {fileID: 159396, guid: 4d293c8e162f3874b982baadd71153d2, type: 2}
m_PrefabInternal: {fileID: 1214943819}
--- !u!114 &176644034
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 176644033}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: efea46735d252e341b44e4ba5066b6ba, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &177612647 --- !u!1 &177612647
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -11932,7 +11962,7 @@ Prefab: ...@@ -11932,7 +11962,7 @@ Prefab:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4188753986315464, guid: ef8622c6f07c11e47aae43d93e8e076a, type: 2} - target: {fileID: 4188753986315464, guid: ef8622c6f07c11e47aae43d93e8e076a, type: 2}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 6 value: 7
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 114249406734343344, guid: ef8622c6f07c11e47aae43d93e8e076a, - target: {fileID: 114249406734343344, guid: ef8622c6f07c11e47aae43d93e8e076a,
type: 2} type: 2}
...@@ -12058,7 +12088,7 @@ Prefab: ...@@ -12058,7 +12088,7 @@ Prefab:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4481930841849142, guid: dfc8b3c7d4a8b004fb5fb574d7b64bbb, type: 2} - target: {fileID: 4481930841849142, guid: dfc8b3c7d4a8b004fb5fb574d7b64bbb, type: 2}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 10 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 114431572037265222, guid: dfc8b3c7d4a8b004fb5fb574d7b64bbb, - target: {fileID: 114431572037265222, guid: dfc8b3c7d4a8b004fb5fb574d7b64bbb,
type: 2} type: 2}
...@@ -12180,7 +12210,7 @@ Transform: ...@@ -12180,7 +12210,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 29.108002, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 29.108002, y: 0, z: 0}
--- !u!1 &371305740 --- !u!1 &371305740
GameObject: GameObject:
...@@ -24557,7 +24587,7 @@ Prefab: ...@@ -24557,7 +24587,7 @@ Prefab:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4000012700653776, guid: d9dcf2a12e0c2094b96357dfd35811ba, type: 2} - target: {fileID: 4000012700653776, guid: d9dcf2a12e0c2094b96357dfd35811ba, type: 2}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 8 value: 9
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 114000013629997260, guid: d9dcf2a12e0c2094b96357dfd35811ba, - target: {fileID: 114000013629997260, guid: d9dcf2a12e0c2094b96357dfd35811ba,
type: 2} type: 2}
...@@ -24571,12 +24601,12 @@ Prefab: ...@@ -24571,12 +24601,12 @@ Prefab:
objectReference: {fileID: 655032289} objectReference: {fileID: 655032289}
- target: {fileID: 1000010762658480, guid: d9dcf2a12e0c2094b96357dfd35811ba, type: 2} - target: {fileID: 1000010762658480, guid: d9dcf2a12e0c2094b96357dfd35811ba, type: 2}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 114000013629997260, guid: d9dcf2a12e0c2094b96357dfd35811ba, - target: {fileID: 114000013629997260, guid: d9dcf2a12e0c2094b96357dfd35811ba,
type: 2} type: 2}
propertyPath: ghost_awarness propertyPath: ghost_awarness
value: 0.15 value: 0.07
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 114000013629997260, guid: d9dcf2a12e0c2094b96357dfd35811ba, - target: {fileID: 114000013629997260, guid: d9dcf2a12e0c2094b96357dfd35811ba,
type: 2} type: 2}
...@@ -24588,7 +24618,13 @@ Prefab: ...@@ -24588,7 +24618,13 @@ Prefab:
propertyPath: chase_speed propertyPath: chase_speed
value: 2 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] - target: {fileID: 23000010900546874, guid: d9dcf2a12e0c2094b96357dfd35811ba,
<