Add ability to note predictions on the side
This commit is contained in:
@@ -93,7 +93,14 @@ public class DoorManager : MonoBehaviour, IDescribable
|
||||
|
||||
public string GetDescribeName()
|
||||
{
|
||||
return mod;
|
||||
if (!string.IsNullOrEmpty(mod))
|
||||
{
|
||||
return mod;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "normal door";
|
||||
}
|
||||
}
|
||||
|
||||
public string GetDescription()
|
||||
|
||||
@@ -144,7 +144,14 @@ public class GuardManager : MonoBehaviour, IDescribable
|
||||
|
||||
public string GetDescribeName()
|
||||
{
|
||||
return mod;
|
||||
if (!string.IsNullOrEmpty(mod))
|
||||
{
|
||||
return mod;
|
||||
}
|
||||
else
|
||||
{
|
||||
return "plain guard";
|
||||
}
|
||||
}
|
||||
|
||||
public string GetDescription()
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Utils;
|
||||
|
||||
public class StatusManager : Singleton<StatusManager>
|
||||
@@ -32,12 +33,11 @@ public class StatusManager : Singleton<StatusManager>
|
||||
|
||||
PopulatePanel(doorPanelThoughts, doorPrefab, LevelLoader.Instance.Doors.Cast<IDescribable>().ToList(),true, LevelLoader.Instance.GlobalModifier == "HIDE");
|
||||
PopulatePanel(guardPanelThoughts, guardPrefab, LevelLoader.Instance.Guards.Cast<IDescribable>().ToList(), true, false);
|
||||
|
||||
//hide side pannel if cup global mod, or if only one guard
|
||||
//add fallback to getdescribename
|
||||
//actually implement the setting of predictions
|
||||
}
|
||||
|
||||
private Color[] colors = new Color[] { Color.white, Color.green, Color.red };
|
||||
private Dictionary<GameObject, int> cycles = new Dictionary<GameObject, int>();
|
||||
|
||||
private void PopulatePanel(Transform panel, GameObject template, List<IDescribable> items, bool interactableType, bool hide)
|
||||
{
|
||||
foreach (Transform child in panel)
|
||||
@@ -70,6 +70,12 @@ public class StatusManager : Singleton<StatusManager>
|
||||
{
|
||||
titleMesh.text = item.GetDescribeName();
|
||||
descMesh.text = "Click to set prediction";
|
||||
cycles[obj] = 0;
|
||||
|
||||
obj.GetComponentInChildren<Button>().onClick.AddListener(() =>
|
||||
{
|
||||
obj.GetComponent<Image>().color = colors[++cycles[obj]%3];
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -148,6 +148,7 @@ GameObject:
|
||||
- component: {fileID: 6345832369379253264}
|
||||
- component: {fileID: 6964363268177595953}
|
||||
- component: {fileID: 83816590129114263}
|
||||
- component: {fileID: 6168579704574998770}
|
||||
m_Layer: 5
|
||||
m_Name: DoorInfoPanel
|
||||
m_TagString: Untagged
|
||||
@@ -215,6 +216,50 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &6168579704574998770
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7282910927779291171}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 83816590129114263}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &7637213532194309026
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
@@ -11,6 +11,7 @@ GameObject:
|
||||
- component: {fileID: 1184486081858943323}
|
||||
- component: {fileID: 9149342820567062795}
|
||||
- component: {fileID: 9066953302634493309}
|
||||
- component: {fileID: 6197084387024201686}
|
||||
m_Layer: 5
|
||||
m_Name: GuardInfoPanel
|
||||
m_TagString: Untagged
|
||||
@@ -78,6 +79,50 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &6197084387024201686
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2262766122812590380}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier: UnityEngine.UI::UnityEngine.UI.Button
|
||||
m_Navigation:
|
||||
m_Mode: 3
|
||||
m_WrapAround: 0
|
||||
m_SelectOnUp: {fileID: 0}
|
||||
m_SelectOnDown: {fileID: 0}
|
||||
m_SelectOnLeft: {fileID: 0}
|
||||
m_SelectOnRight: {fileID: 0}
|
||||
m_Transition: 1
|
||||
m_Colors:
|
||||
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
|
||||
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
|
||||
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
|
||||
m_ColorMultiplier: 1
|
||||
m_FadeDuration: 0.1
|
||||
m_SpriteState:
|
||||
m_HighlightedSprite: {fileID: 0}
|
||||
m_PressedSprite: {fileID: 0}
|
||||
m_SelectedSprite: {fileID: 0}
|
||||
m_DisabledSprite: {fileID: 0}
|
||||
m_AnimationTriggers:
|
||||
m_NormalTrigger: Normal
|
||||
m_HighlightedTrigger: Highlighted
|
||||
m_PressedTrigger: Pressed
|
||||
m_SelectedTrigger: Selected
|
||||
m_DisabledTrigger: Disabled
|
||||
m_Interactable: 1
|
||||
m_TargetGraphic: {fileID: 9066953302634493309}
|
||||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
--- !u!1 &2901148610593778834
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
||||
Reference in New Issue
Block a user