Updated text to match new font; fixed line endings again.
This commit is contained in:
parent
9baa4042dc
commit
0032b3b3ba
3 changed files with 104 additions and 104 deletions
|
@ -484,7 +484,7 @@ MonoBehaviour:
|
||||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
m_FontData:
|
m_FontData:
|
||||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
m_Font: {fileID: 12800000, guid: 86499a4a05368424fa17fc7f098d46a9, type: 3}
|
||||||
m_FontSize: 14
|
m_FontSize: 14
|
||||||
m_FontStyle: 0
|
m_FontStyle: 0
|
||||||
m_BestFit: 0
|
m_BestFit: 0
|
||||||
|
|
|
@ -990,7 +990,7 @@ Prefab:
|
||||||
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
|
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
|
||||||
type: 2}
|
type: 2}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 0
|
value: -513.4081
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 224424466063770242, guid: c67fa24334c0f364cad8798522e92116,
|
- target: {fileID: 224424466063770242, guid: c67fa24334c0f364cad8798522e92116,
|
||||||
type: 2}
|
type: 2}
|
||||||
|
@ -2218,7 +2218,7 @@ MonoBehaviour:
|
||||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
m_FontData:
|
m_FontData:
|
||||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
m_Font: {fileID: 12800000, guid: 86499a4a05368424fa17fc7f098d46a9, type: 3}
|
||||||
m_FontSize: 16
|
m_FontSize: 16
|
||||||
m_FontStyle: 0
|
m_FontStyle: 0
|
||||||
m_BestFit: 0
|
m_BestFit: 0
|
||||||
|
@ -3705,7 +3705,7 @@ Prefab:
|
||||||
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
|
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
|
||||||
type: 2}
|
type: 2}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 0
|
value: -513.4081
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 224424466063770242, guid: c67fa24334c0f364cad8798522e92116,
|
- target: {fileID: 224424466063770242, guid: c67fa24334c0f364cad8798522e92116,
|
||||||
type: 2}
|
type: 2}
|
||||||
|
@ -3847,12 +3847,12 @@ Prefab:
|
||||||
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
|
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
|
||||||
type: 2}
|
type: 2}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 477.5
|
value: 528
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
|
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
|
||||||
type: 2}
|
type: 2}
|
||||||
propertyPath: m_LocalPosition.y
|
propertyPath: m_LocalPosition.y
|
||||||
value: 316.5
|
value: 270.5
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
|
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
|
||||||
type: 2}
|
type: 2}
|
||||||
|
@ -4694,7 +4694,7 @@ Prefab:
|
||||||
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
|
- target: {fileID: 224003334026830312, guid: c67fa24334c0f364cad8798522e92116,
|
||||||
type: 2}
|
type: 2}
|
||||||
propertyPath: m_LocalPosition.x
|
propertyPath: m_LocalPosition.x
|
||||||
value: 0
|
value: -513.4081
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 224424466063770242, guid: c67fa24334c0f364cad8798522e92116,
|
- target: {fileID: 224424466063770242, guid: c67fa24334c0f364cad8798522e92116,
|
||||||
type: 2}
|
type: 2}
|
||||||
|
@ -6211,7 +6211,7 @@ MonoBehaviour:
|
||||||
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
|
||||||
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
|
||||||
m_FontData:
|
m_FontData:
|
||||||
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
|
m_Font: {fileID: 12800000, guid: 86499a4a05368424fa17fc7f098d46a9, type: 3}
|
||||||
m_FontSize: 14
|
m_FontSize: 14
|
||||||
m_FontStyle: 0
|
m_FontStyle: 0
|
||||||
m_BestFit: 0
|
m_BestFit: 0
|
||||||
|
|
|
@ -1,29 +1,29 @@
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.UI;
|
using UnityEngine.UI;
|
||||||
|
|
||||||
public class MissionTracker : Photon.PunBehaviour
|
public class MissionTracker : Photon.PunBehaviour
|
||||||
{
|
{
|
||||||
const string COMPLETED_TEXT = "(COMPLETED) ";
|
const string COMPLETED_TEXT = "(COMPLETED) ";
|
||||||
const string MISSION_LOG_TEXT = "Mission Log: _";
|
const string MISSION_LOG_TEXT = "Mission Log: _";
|
||||||
|
|
||||||
const int MAX_GUARD_POINTS = 5;
|
const int MAX_GUARD_POINTS = 5;
|
||||||
|
|
||||||
const float GUARD_NOTIFICATION_DELAY = 5.0f;
|
const float GUARD_NOTIFICATION_DELAY = 5.0f;
|
||||||
const float GUARD_NOTIFICATION_TIME = 10.0f;
|
const float GUARD_NOTIFICATION_TIME = 10.0f;
|
||||||
|
|
||||||
private static MissionTracker mSingleton;
|
private static MissionTracker mSingleton;
|
||||||
|
|
||||||
public Text spyMissionLogText;
|
public Text spyMissionLogText;
|
||||||
public GameObject guardNotificationPanel;
|
public GameObject guardNotificationPanel;
|
||||||
public Text guardNotificationText;
|
public Text guardNotificationText;
|
||||||
|
|
||||||
private IDictionary<string, Mission> mMissionLog; // map interaction to mission
|
private IDictionary<string, Mission> mMissionLog; // map interaction to mission
|
||||||
private int mCompletedMissions;
|
private int mCompletedMissions;
|
||||||
private int mGuardPoints;
|
private int mGuardPoints;
|
||||||
private int mGuardIncorrectGuesses;
|
private int mGuardIncorrectGuesses;
|
||||||
|
|
||||||
private class Mission
|
private class Mission
|
||||||
{
|
{
|
||||||
private string mAlertText; // text shown to overseers after mission completes
|
private string mAlertText; // text shown to overseers after mission completes
|
||||||
|
@ -45,7 +45,7 @@ public class MissionTracker : Photon.PunBehaviour
|
||||||
mName = name;
|
mName = name;
|
||||||
Completed = false;
|
Completed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Singleton instance of the MissionTracker.
|
* The Singleton instance of the MissionTracker.
|
||||||
|
@ -57,17 +57,17 @@ public class MissionTracker : Photon.PunBehaviour
|
||||||
/**
|
/**
|
||||||
* Guard caught a spy.
|
* Guard caught a spy.
|
||||||
*/
|
*/
|
||||||
public void CaughtAgent(int agentId)
|
public void CaughtAgent(int agentId)
|
||||||
{
|
{
|
||||||
photonView.RPC("CaughtAgentRPC", PhotonTargets.All, agentId);
|
photonView.RPC("CaughtAgentRPC", PhotonTargets.All, agentId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Guard caught a partygoer and must be punished.
|
* Guard caught a partygoer and must be punished.
|
||||||
*/
|
*/
|
||||||
public void CaughtIncorrect()
|
public void CaughtIncorrect()
|
||||||
{
|
{
|
||||||
photonView.RPC("CaughtIncorrectRPC", PhotonTargets.All);
|
photonView.RPC("CaughtIncorrectRPC", PhotonTargets.All);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,18 +106,18 @@ public class MissionTracker : Photon.PunBehaviour
|
||||||
mSingleton = this;
|
mSingleton = this;
|
||||||
|
|
||||||
// populate missions and set initial values
|
// populate missions and set initial values
|
||||||
mMissionLog = new Dictionary<string, Mission>();
|
mMissionLog = new Dictionary<string, Mission>();
|
||||||
mCompletedMissions = 0;
|
mCompletedMissions = 0;
|
||||||
mGuardPoints = 0;
|
mGuardPoints = 0;
|
||||||
mGuardIncorrectGuesses = 0;
|
mGuardIncorrectGuesses = 0;
|
||||||
|
|
||||||
mMissionLog["statue_swap"] = new Mission(
|
mMissionLog["statue_swap"] = new Mission(
|
||||||
"statue_swap",
|
"statue_swap",
|
||||||
"Replace the marked statue with a bugged replica.",
|
"Replace the marked statue with a bugged replica.",
|
||||||
"We're picking up some electromagnetic interference. " +
|
"We're picking up some electromagnetic interference. " +
|
||||||
"Enemy forces have planted listening devices somewhere on the premises!"
|
"Enemy forces have planted listening devices somewhere on the premises!"
|
||||||
);
|
);
|
||||||
|
|
||||||
mMissionLog["book_message"] = new Mission(
|
mMissionLog["book_message"] = new Mission(
|
||||||
"book_message",
|
"book_message",
|
||||||
"Plant critical intelligence in the designated book.",
|
"Plant critical intelligence in the designated book.",
|
||||||
|
@ -179,62 +179,62 @@ public class MissionTracker : Photon.PunBehaviour
|
||||||
}
|
}
|
||||||
|
|
||||||
#region coroutines
|
#region coroutines
|
||||||
IEnumerator DisplayNotification(string text)
|
IEnumerator DisplayNotification(string text)
|
||||||
{
|
{
|
||||||
// only display for guards...
|
// only display for guards...
|
||||||
if (!IsGuard)
|
if (!IsGuard)
|
||||||
{
|
{
|
||||||
yield break;
|
yield break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// wait before displaying notification
|
// wait before displaying notification
|
||||||
yield return new WaitForSeconds(GUARD_NOTIFICATION_DELAY);
|
yield return new WaitForSeconds(GUARD_NOTIFICATION_DELAY);
|
||||||
|
|
||||||
// set the text and show the panel
|
// set the text and show the panel
|
||||||
guardNotificationText.text = text;
|
guardNotificationText.text = text;
|
||||||
guardNotificationPanel.SetActive(true);
|
guardNotificationPanel.SetActive(true);
|
||||||
|
|
||||||
// hide the panel after a certain amount of time
|
// hide the panel after a certain amount of time
|
||||||
yield return new WaitForSeconds(GUARD_NOTIFICATION_TIME);
|
yield return new WaitForSeconds(GUARD_NOTIFICATION_TIME);
|
||||||
guardNotificationPanel.SetActive(false);
|
guardNotificationPanel.SetActive(false);
|
||||||
|
|
||||||
yield return null;
|
yield return null;
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region rpc
|
#region rpc
|
||||||
[PunRPC]
|
[PunRPC]
|
||||||
void CompleteMissionRPC(string interactionName)
|
void CompleteMissionRPC(string interactionName)
|
||||||
{
|
{
|
||||||
Mission m = mMissionLog[interactionName];
|
Mission m = mMissionLog[interactionName];
|
||||||
m.Completed = true;
|
m.Completed = true;
|
||||||
mCompletedMissions++;
|
mCompletedMissions++;
|
||||||
|
|
||||||
float score = mCompletedMissions + mGuardIncorrectGuesses;
|
float score = mCompletedMissions + mGuardIncorrectGuesses;
|
||||||
ScorePanelController.Singleton.UpdateSpyScore(score / mMissionLog.Count);
|
ScorePanelController.Singleton.UpdateSpyScore(score / mMissionLog.Count);
|
||||||
|
|
||||||
StartCoroutine(DisplayNotification(m.AlertText));
|
StartCoroutine(DisplayNotification(m.AlertText));
|
||||||
UpdateMissionLog();
|
UpdateMissionLog();
|
||||||
}
|
}
|
||||||
|
|
||||||
[PunRPC]
|
[PunRPC]
|
||||||
void CaughtAgentRPC(int spyId)
|
void CaughtAgentRPC(int spyId)
|
||||||
{
|
{
|
||||||
mGuardPoints++;
|
mGuardPoints++;
|
||||||
ScorePanelController.Singleton.UpdateGuardScore((float) mGuardPoints / MAX_GUARD_POINTS);
|
ScorePanelController.Singleton.UpdateGuardScore((float) mGuardPoints / MAX_GUARD_POINTS);
|
||||||
|
|
||||||
// Get Random NPC
|
// Get Random NPC
|
||||||
var npcs = GameManager.ActiveManager.GetNpcs();
|
var npcs = GameManager.ActiveManager.GetNpcs();
|
||||||
int randInt = (int)(UnityEngine.Random.value * npcs.Count);
|
int randInt = (int)(UnityEngine.Random.value * npcs.Count);
|
||||||
GameManager.ActiveManager.photonView.RPC("ReplaceNPCWithSpyRPC", PhotonTargets.All, spyId, npcs[randInt].photonView.viewID);
|
GameManager.ActiveManager.photonView.RPC("ReplaceNPCWithSpyRPC", PhotonTargets.All, spyId, npcs[randInt].photonView.viewID);
|
||||||
}
|
|
||||||
|
|
||||||
[PunRPC]
|
|
||||||
void CaughtIncorrectRPC()
|
|
||||||
{
|
|
||||||
mGuardIncorrectGuesses++;
|
|
||||||
float score = mCompletedMissions + mGuardIncorrectGuesses;
|
|
||||||
ScorePanelController.Singleton.UpdateSpyScore(score / mMissionLog.Count);
|
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
}
|
[PunRPC]
|
||||||
|
void CaughtIncorrectRPC()
|
||||||
|
{
|
||||||
|
mGuardIncorrectGuesses++;
|
||||||
|
float score = mCompletedMissions + mGuardIncorrectGuesses;
|
||||||
|
ScorePanelController.Singleton.UpdateSpyScore(score / mMissionLog.Count);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
|
Reference in a new issue