- Fixed the tutorial

This commit is contained in:
Patrice Vignola 2015-08-16 22:09:18 -04:00
parent f661bbede2
commit 932e7e90c0
6 changed files with 40 additions and 24 deletions

View File

@ -1640,8 +1640,8 @@ RectTransform:
- {fileID: 667257316} - {fileID: 667257316}
m_Father: {fileID: 750965895} m_Father: {fileID: 750965895}
m_RootOrder: 2 m_RootOrder: 2
m_AnchorMin: {x: .0213474818, y: .66071701} m_AnchorMin: {x: .0213474818, y: .606641531}
m_AnchorMax: {x: .257347494, y: .857717037} m_AnchorMax: {x: .286652535, y: .857717037}
m_AnchoredPosition: {x: 0, y: 0} m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: .5, y: .5} m_Pivot: {x: .5, y: .5}

View File

@ -26,7 +26,7 @@ namespace DeathBook.Model
private float globalAwareness; //on a scale from 0 to 1 private float globalAwareness; //on a scale from 0 to 1
public float GlobalAwareness { get { return globalAwareness; } } public float GlobalAwareness { get { return globalAwareness; } }
public int tutorialInt = 0; public int tutorialInt = -1;
public bool allowNext = true; public bool allowNext = true;
private GameStrategy strategy = null; private GameStrategy strategy = null;

View File

@ -104,7 +104,7 @@ namespace DeathBook.Model
public bool Kill() public bool Kill()
{ {
if (Online || ((LevelManager.Instance.GameLevel.tutorialInt < 4) && (LevelManager.Instance.GameLevel.tutorialInt >= 0))) if (Online || (LevelManager.Instance.GameLevel.tutorialInt > -1 && LevelManager.Instance.GameLevel.tutorialInt < 4))
return false; return false;
//Debug.Log("Person " + id + " died!"); //Debug.Log("Person " + id + " died!");
@ -119,6 +119,11 @@ namespace DeathBook.Model
LevelManager.Instance.GameLevel.RegisterKill(this); LevelManager.Instance.GameLevel.RegisterKill(this);
if (LevelManager.Instance.GameLevel.tutorialInt == 5 && LevelManager.Instance.GameLevel.NumDead == 3)
{
LevelManager.Instance.GameLevel.tutorialInt = 6;
}
return true; return true;
} }

View File

@ -167,7 +167,7 @@ public class NetworkingSphere : MonoBehaviour
if (!_isRotatingTowardsNode || node != _selectedNode) if (!_isRotatingTowardsNode || node != _selectedNode)
{ {
if ((lvl.tutorialInt > 1) || (lvl.tutorialInt > 1)) if ((lvl.tutorialInt == -1) || (lvl.tutorialInt > 1) || (lvl.tutorialInt > 1))
FocusOnNode(node); FocusOnNode(node);
} }

View File

@ -14,25 +14,22 @@ public class TutorialScript : MonoBehaviour {
void Start() void Start()
{ {
lvl = LevelManager.Instance.GameLevel; lvl = LevelManager.Instance.GameLevel;
lvl.tutorialInt = 0;
} }
void Update() { void Update()
{
btnNext.gameObject.SetActive(lvl.allowNext); btnNext.gameObject.SetActive(lvl.allowNext);
if (lvl.tutorialInt == 0) if (lvl.tutorialInt == 0)
{ {
Time.timeScale = 0; Time.timeScale = 0;
lvl.allowNext = true; lvl.allowNext = true;
tutorialText.text = "The facebook servers are full!\nMark Zuckerberg hired you, Death, to kill off a few of his users.\n\nCareful, or you might scare them away from Mark's website..."; tutorialText.text = "The Slaugthr servers are full!\nMark Zuckerberg hired you, Death, to kill off a few of his annoying users.\n\nCareful, or you might scare the rest away from Mark's website...";
} }
else if (lvl.tutorialInt == 1) else if (lvl.tutorialInt == 1)
{ {
tutorialText.text = "See how navigating works by holding the right mouse button and moving the sphere.\n\nThen, hit Next!"; tutorialText.text = "See how navigating works by holding the right mouse button and moving the network around.\n\nThen, hit Next!";
} }
else if (lvl.tutorialInt == 2) else if (lvl.tutorialInt == 2)
{ {
@ -40,17 +37,23 @@ public class TutorialScript : MonoBehaviour {
} }
else if (lvl.tutorialInt == 3) else if (lvl.tutorialInt == 3)
{ {
tutorialText.text = "Let's see what happens when you click on a user's friend list."; tutorialText.text = "Let's see what happens when you click on a friend's picture in the selected user's friend list.";
} }
else if (lvl.tutorialInt == 4) else if (lvl.tutorialInt == 4)
{ {
tutorialText.text = "Alright, time for our first victim.\nHold the LEFT mouse button over a user until the X is complete.\nBeware! The user must be offline to be killed!"; tutorialText.text = "Alright, time for our first victim.\nHold down the LEFT mouse button over a user until the X is complete. Beware! The user must be offline (darker picture) to be killed!";
tutorialText.text += "\n\nYou can hold the mouse button until the user goes offline."; tutorialText.text += "\n\nIf the user is online, you can hold the mouse button until he goes offline.";
} }
else if (lvl.tutorialInt == 5) else if (lvl.tutorialInt == 5)
{ {
tutorialText.text = "Kill many users to see how the color changes\n\nRemember, as users realize something is wrong with facebook,\nthe entire network will turn red!\n\nHaveFun!"; tutorialText.text = "Kill 2 more users to see how the color of the links and the borders changes.\n\nRemember, as users realize something is wrong with Slaugthr, the entire network will turn red!";
}
else if (lvl.tutorialInt == 6)
{
tutorialText.text = "Finally, notice the big \"Global Awareness\" bar at the bottom right corner of the screen. When it reaches 100%, it means you have been noticed and you lose!";
tutorialText.text += "\n\nHit next to start playing.";
lvl.allowNext = true; lvl.allowNext = true;
Time.timeScale = 0f;
} }
else else
{ {
@ -62,13 +65,19 @@ public class TutorialScript : MonoBehaviour {
public void btnClick() public void btnClick()
{ {
if (lvl.tutorialInt == 0)
{
Time.timeScale = 1;
}
if (lvl.tutorialInt == 6)
{
Application.LoadLevel("Gameplay");
Time.timeScale = 1;
}
lvl.tutorialInt++; lvl.tutorialInt++;
//Debug.Log(lvl.tutorialInt + ", aasfasf");
Time.timeScale = 1;
tutorialText.text = "eee";
lvl.allowNext = false; lvl.allowNext = false;
//panel.transform.Translate(Vector3.right * 100);
} }
} }

View File

@ -5,7 +5,9 @@ EditorBuildSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Scenes: m_Scenes:
- enabled: 1
path: Assets/Scenes/Gameplay.unity
- enabled: 1 - enabled: 1
path: Assets/Scenes/splash.unity path: Assets/Scenes/splash.unity
- enabled: 1
path: Assets/Scenes/Tutoriel.unity
- enabled: 1
path: Assets/Scenes/Gameplay.unity