Fixed issue preventing spies from moving.

This commit is contained in:
Randall 2017-11-30 13:34:49 -06:00
parent 68275766d4
commit f88d4e5998
4 changed files with 45 additions and 42 deletions

View file

@ -77,17 +77,15 @@ LightmapSettings:
m_PVRDirectSampleCount: 32 m_PVRDirectSampleCount: 32
m_PVRSampleCount: 500 m_PVRSampleCount: 500
m_PVRBounces: 2 m_PVRBounces: 2
m_PVRFilterTypeDirect: 0 m_PVRFiltering: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVRFilteringMode: 1 m_PVRFilteringMode: 1
m_PVRCulling: 1 m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1 m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 5 m_PVRFilteringGaussRadiusIndirect: 5
m_PVRFilteringGaussRadiusAO: 2 m_PVRFilteringGaussRadiusAO: 2
m_PVRFilteringAtrousPositionSigmaDirect: 0.5 m_PVRFilteringAtrousColorSigma: 1
m_PVRFilteringAtrousPositionSigmaIndirect: 2 m_PVRFilteringAtrousNormalSigma: 1
m_PVRFilteringAtrousPositionSigmaAO: 1 m_PVRFilteringAtrousPositionSigma: 1
m_LightingDataAsset: {fileID: 0} m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1 m_UseShadowmask: 1
--- !u!196 &4 --- !u!196 &4
@ -1326,12 +1324,12 @@ Prefab:
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116, - target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
type: 2} type: 2}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: -35
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116, - target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
type: 2} type: 2}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 0 value: 70
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116, - target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
type: 2} type: 2}
@ -2903,7 +2901,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1} m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 0
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
@ -5077,12 +5075,12 @@ Prefab:
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116, - target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
type: 2} type: 2}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: -35
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116, - target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
type: 2} type: 2}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 0 value: 70
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116, - target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
type: 2} type: 2}
@ -5660,7 +5658,7 @@ MonoBehaviour:
m_EditorClassIdentifier: m_EditorClassIdentifier:
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1 m_RaycastTarget: 0
m_OnCullStateChanged: m_OnCullStateChanged:
m_PersistentCalls: m_PersistentCalls:
m_Calls: [] m_Calls: []
@ -6594,12 +6592,12 @@ Prefab:
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116, - target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
type: 2} type: 2}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: -35
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116, - target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
type: 2} type: 2}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 0 value: 70
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116, - target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
type: 2} type: 2}

View file

@ -23,9 +23,14 @@ public class IdleClickAction : Action
public override void Act(StateController controller) public override void Act(StateController controller)
{ {
// If the user clicks, but not on a UI object ... // If the user clicks, but not on a UI object ...
if (EventSystem.current.IsPointerOverGameObject()) GameObject target = null;
Debug.Log("Clicking on UI element"); if (EventSystem.current.IsPointerOverGameObject())
if (Input.GetMouseButtonDown(0) && !EventSystem.current.IsPointerOverGameObject()) {
Debug.Log("Clicking on UI element");
target = EventSystem.current.currentSelectedGameObject;
}
if (Input.GetMouseButtonDown(0) && (target == null || !target.GetActive()))
{ {
if (controller.Interactor) if (controller.Interactor)
{ {

View file

@ -1,13 +1,13 @@
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine; using UnityEngine;
public class InGameMenuController : MonoBehaviour { public class InGameMenuController : MonoBehaviour {
public static bool MenuBlocked { get; set; } public static bool MenuBlocked { get; set; }
public GameObject inGameMenu; public GameObject inGameMenu;
private void Start() { private void Start() {
MenuBlocked = false; MenuBlocked = false;
} }
@ -17,19 +17,19 @@ public class InGameMenuController : MonoBehaviour {
return; return;
} }
if (Input.GetKeyDown(KeyCode.Escape)) { if (Input.GetKeyDown(KeyCode.Escape)) {
EscapePressed(); EscapePressed();
} }
} }
void EscapePressed() { void EscapePressed() {
if (inGameMenu.GetActive()) { if (inGameMenu.GetActive()) {
Resume(); Resume();
} else { } else {
inGameMenu.SetActive(true); inGameMenu.SetActive(true);
} }
} }
public void Resume() { public void Resume() {
inGameMenu.SetActive(false); inGameMenu.SetActive(false);
} }
} }

View file

@ -1 +1 @@
m_EditorVersion: 2017.1.2f1 m_EditorVersion: 2017.1.1f1