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