starting the tutorial scene

This commit is contained in:
unknown 2015-08-16 16:31:04 -04:00
parent f8d9c4e606
commit aaea581c62
8 changed files with 1787 additions and 14 deletions

1673
Assets/Scenes/Tutoriel.unity Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 954690b6e2639f149bb1741d688d2815
timeCreated: 1439747828
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View File

@ -195,8 +195,8 @@ Camera:
m_GameObject: {fileID: 608195445}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: .192156866, g: .301960796, b: .474509805, a: .0196078438}
m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: .0196078438}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
@ -317,6 +317,7 @@ GameObject:
- 33: {fileID: 1865312315}
- 64: {fileID: 1865312314}
- 23: {fileID: 1865312313}
- 114: {fileID: 1865312317}
m_Layer: 0
m_Name: Background
m_TagString: Untagged
@ -379,3 +380,15 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
--- !u!114 &1865312317
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1865312312}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2931322f1f0c62f40b2d7a6e493934ca, type: 3}
m_Name:
m_EditorClassIdentifier:
timeToWait: 2

View File

@ -26,6 +26,7 @@ namespace DeathBook.Model
private float globalAwareness; //on a scale from 0 to 1
public float GlobalAwareness { get { return globalAwareness; } }
public int tutorialInt = 0;
public Level(List<Person> people, List<FriendshipLink> friendships)
{

View File

@ -68,7 +68,7 @@ public class NetworkingSphere : MonoBehaviour
_timeSinceLastClick += Time.deltaTime;
}
manager.GameLevel.Update(Time.deltaTime);
manager.GameLevel.Update(Time.deltaTime);
//TEMPORARY QUICK FIX: Even though we are never moving the sphere, it starts moving as soon as it stops rotating
transform.position = Vector3.zero;
@ -80,7 +80,7 @@ public class NetworkingSphere : MonoBehaviour
Vector3 worldMousePos = Camera.main.ScreenToWorldPoint(screenMousePos);
// If the world position of the mouse is greater than the radius of the sphere, we are outside
if (Mathf.Sqrt(worldMousePos.x * worldMousePos.x + worldMousePos.y * worldMousePos.y) > levelOptions.SphereRadius + 1f)
if (Mathf.Sqrt(worldMousePos.x * worldMousePos.x + worldMousePos.y * worldMousePos.y) > levelOptions.SphereRadius + 1f)
{
transform.Rotate(Vector3.one * Time.deltaTime * rotationSpeed);
}
@ -96,21 +96,21 @@ public class NetworkingSphere : MonoBehaviour
delta = new Vector3();
}
if (dragging && !_isRotatingTowardsNode)
if ((dragging && !_isRotatingTowardsNode)) // && ((lvl.tutorialCount == 0) || (lvl.tutorialCount == 1))
{
MoveSphere();
}
//scroll
if (Input.GetAxis("Mouse ScrollWheel") != 0)
{
// if (Camera.main.ScreenToViewportPoint(Input.mousePosition) < new Vector3(1,1,1))
if (Camera.main.ScreenToViewportPoint(Input.mousePosition).x < 1)
{
Camera.main.fieldOfView -= Input.GetAxis("Mouse ScrollWheel") * 10f;
}
}
//scroll
if (Input.GetAxis("Mouse ScrollWheel") != 0)
{
// if (Camera.main.ScreenToViewportPoint(Input.mousePosition) < new Vector3(1,1,1))
if (Camera.main.ScreenToViewportPoint(Input.mousePosition).x < 1)
{
Camera.main.fieldOfView -= Input.GetAxis("Mouse ScrollWheel") * 10f;
}
}
}
void MoveSphere()

View File

@ -0,0 +1,64 @@
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
using DeathBook.Model;
public class TutorialScript : MonoBehaviour {
//public int tutorialInt = 0;
public GameObject panel;
public Text tutorialText;
public Button btnNext;
private Level lvl;
// Use this for initialization
void Start()
{
lvl = LevelManager.Instance.GameLevel;
}
void Update() {
if (lvl.tutorialInt == 0)
{
Time.timeScale = 0;
tutorialText.text = "The facebook servers are full!\nMark Zuckerberg hired you, Death, to kill off a few of his users.\nCareful, or you might scare them away from Mark's website...";
//btnNext.onClick
}
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!";
}
else if (lvl.tutorialInt == 2)
{
tutorialText.text = "Move around by clicking on the users in the network!";
}
else if (lvl.tutorialInt == 3)
{
tutorialText.text = "Let's see what happens when you click on a user's friend list.";
}
else if (lvl.tutorialInt == 4)
{
tutorialText.text = "Alright, time for our first victim.\nHold the right mouse button over a user until the X appears completely.";
}
else
{
panel.SetActive(false);
}
}
public void btnClick()
{
lvl.tutorialInt++;
Debug.Log(lvl.tutorialInt + ", aasfasf");
Time.timeScale = 1;
tutorialText.text = "eee";
//panel.transform.Translate(Vector3.right * 100);
}
}

View File

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: c42f0ece4454ca044b3152cc78312428
timeCreated: 1439753311
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,3 +7,5 @@ EditorBuildSettings:
m_Scenes:
- enabled: 1
path: Assets/Scenes/Gameplay.unity
- enabled: 1
path: Assets/Scenes/splash.unity