////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// void Awake() { instance = this; int[] items = new int[]{1,2,3,4,5,6,7,8,9,10,41};//Lista de niveles en los que van a aparecer los tutoriales tutorialsList = items.ToList(); }
public TutorialScreen(string heading, string message, TutorialManager.PikaSprites pikaSprite, GameObject targetObj) { this.heading = heading; this.message = message; this.pikaSprite = pikaSprite; this.targetObj = targetObj; }
void TutorialFase() { if (GameManager.TutorialMode == true) { TutorialController tutorialController = FindObjectOfType <TutorialController>(); TutorialManager.ToggleImagePanel(true); TutorialManager.ToggleMessage(true); TutorialManager.pauseTutorial = false; TutorialManager.finishMessage = true; TutorialManager.ToogleButtonNextTutorial(); tutorialController.NextOnTap(); } }
public void DeleteSaveData() { if (File.Exists(Application.persistentDataPath + savefile)) { File.Delete(Application.persistentDataPath + savefile); } if (File.Exists(Application.persistentDataPath + "gamemanager_trapeze.save")) { File.Delete(Application.persistentDataPath + "gamemanager_trapeze.save"); } TutorialManager.DeleteSaveData(); TrickManager.DeleteSaveData(); }
private void Awake() { #region Singleton if (instance != null && instance != this) { Destroy(gameObject); } else { instance = this; } #endregion }
private void Awake() { #region singleton if (Instance == null) { Instance = this; } else if (Instance != this) { //Destroy(gameObject); } #endregion }
public static void SetStateTutorial(this MonoBehaviour mono, TutorialEnums.TutorialId id, bool isCompleted) { PlayerData.SaveTutorial(id, isCompleted); if (ReferenceEquals(TutorialManager.InstanceAwake(), null)) { LogGame.Log("[Tutorial Manager] Tutorial is null."); return; } TutorialManager.Instance.SetStateCompleted(isCompleted); }
public static void Launch(string fileNameWithoutExtension) { string fullPath = Amplitude.Unity.Framework.Path.GetFullPath("Public/Tutorial"); IEnumerable <GameSaveDescriptor> source = from element in TutorialManager.GetListOfGameSaveDescritors(fullPath) orderby element.SourceFileName select element; GameSaveDescriptor gameSaveDescriptor = source.FirstOrDefault((GameSaveDescriptor element) => System.IO.Path.GetFileNameWithoutExtension(element.SourceFileName).Equals(fileNameWithoutExtension, StringComparison.InvariantCultureIgnoreCase)); if (gameSaveDescriptor != null) { TutorialManager.Launch(gameSaveDescriptor); } }
void Awake() { Instance = this; Phase = 0; UpdateTutorialItems(); MessageCenter.Instance.RegisterListener(MessageType.PossessorSpawned, HandlePossessorSpawned); MessageCenter.Instance.RegisterListener(MessageType.PossessorDestroyed, HandlePossessorDestroyed); MessageCenter.Instance.RegisterListener(MessageType.AbilityPlaced, HandleAbilityPlaced); sent = false; }
public void checkTutorial(bool firstPlay) { if (firstPlay == false) { firstPlay = true; if (turnNumber <= 0) { TutorialManager tman = GetComponent <TutorialManager>(); tutorialPanel.SetActive(true); tman.startTutorial(); } } }
/// <summary> /// Método Awake, que se ejecuta cuando carga el script /// </summary> void Awake() { // Se instancia a si misma if (instance == null) { instance = this; } else { Destroy(gameObject); return; } }
// Use this for initialization private void OnTriggerEnter2D(Collider2D collision) { if (collision.transform.CompareTag("Player")) { // print("player"); GameManager gameManager = GameManager.I; // gameManager.PauseForTutorial(colliderID); TutorialManager tutorialManager = GameObject.FindObjectOfType <TutorialManager>(); tutorialManager.PauseForTutorial(colliderID); } }
public override void OnInspectorGUI() { base.OnInspectorGUI(); _tm = target as TutorialManager; foreach (var language in _tm.languages) { language.name = language.GetLanguages().ToString(); foreach (var text in language.GetTextList()) { text.name = text.GetPart().ToString(); } } }
// Initialization void Awake() { // get reference to runManager runManager = Object.FindObjectOfType <RunManager>(); // get reference to gameManager gameManager = Object.FindObjectOfType <GameManager>(); tutorialManager = Object.FindObjectOfType <TutorialManager>(); // record emotion fill colors emotionFillColors = new Dictionary <EmotionType, Color>(); emotionFillColors.Add(EmotionType.anxiety, anxietyMeter.transform.Find("Filler").GetComponent <Image>().color); emotionFillColors.Add(EmotionType.frustration, frustrationMeter.transform.Find("Filler").GetComponent <Image>().color); emotionFillColors.Add(EmotionType.despair, despairMeter.transform.Find("Filler").GetComponent <Image>().color); }
private void Awake() { // Singleton logic: if (Instance == null) { Instance = this; } else { Destroy(gameObject); return; } }
void Start() { self = this; note.gameObject.SetActive(false); if (resetOnPlay && self.settings.enableTutorial) { foreach (var i in tutorials) { i.finished = false; } } }
/// <summary> Cache components. </summary> private void Start() { Weapon.OnUnsuccessfulHit += MissedBottle; mHealthController = gameObject.GetComponent <HealthController>(); mHealthController.OnDeath += OnDamaged; mConductor = Conductor.GetActiveConductor(); mTutorialManager = FindObjectOfType <TutorialManager>(); if (MissedBeatSound) { mAudioSource = gameObject.GetComponent <AudioSource>(); } mCrrtHealth = Health; }
void Awake() { transform.localPosition = Vector3.zero; instance = this; int playTuto = PlayerPrefs.GetInt(NameManager.PREF_PLAY_TUTORIAL, NameManager.PREF_PLAY_TUTORIAL_DEFAULT); // int playTuto = 0; isPlay = playTuto == 0 ? false : true; CurrentTuto = 0; }
public void EndTutorial() { if (tutorialManager == null) { Debug.LogError("MatchManager:EndTutorial(): tutorialManager not set"); return; } tutorialManager.End(); tutorialManager = null; PhotonNetwork.OfflineMode = false; UiManager.Instance.ShowMainMenu(); UiManager.Instance.SetReturnToMenuPanelActive(false); }
public void init() { _tutMan = GameObject.FindGameObjectWithTag ("Tutorial").GetComponent<TutorialManager> (); calendar = new Calendar(); _currentMode = SPEED_MODE.NORMAL; _timeMultiplier = new float[4] { 0.0f, 1.0f, 2.0f, 3.0f }; _currentTimeMultiplier = _timeMultiplier[(uint)_currentMode]; _timePerDay = 1.0f; _currentHour = 0; _timePerHour = _timePerDay / 24.0f; _elapsedTime = 0.0f; updateUI (); }
private void Start() { RenderSettings.skybox.SetColor("_TintColor", new Color32(200, 230, 50, 255)); SetTopUIPosition(); StartCoroutine("GameStartAnimation"); GameStart(PlayerData.currentStage); if (PlayerData.currentStage == 0) { tutorialManager = GetComponent <TutorialManager>(); tutorialManager.StartTutorial(); } AdMobManager.Instance.ShowBanner(); }
// Init private void Awake() { stateManager = gameObject.GetComponent <StateManager>(); playerManager = gameObject.GetComponent <PlayerManager>(); counterManager = gameObject.GetComponent <CounterManager>(); storageManager = gameObject.GetComponent <StorageManager>(); customerManager = gameObject.GetComponent <CustomerManager>(); tutorialManager = gameObject.GetComponent <TutorialManager>(); tutorialState = GameObject.FindGameObjectWithTag("TutorialState").GetComponent <TutorialState>(); itemManager = gameObject.GetComponent <ItemManager>(); soundManager = GameObject.FindGameObjectWithTag("Sound").GetComponent <SoundManager>(); selectorController = GameObject.FindGameObjectWithTag("Selector").GetComponent <SelectorController>(); }
public void helpButtonClicked() { if (logicManager.logicState != LogicManager.LOGIC_STATE.DELETING) { TutorialManager tutMan = GameObject.FindGameObjectWithTag("Tutorial").GetComponent <TutorialManager> (); tutMan.startTuto(new Tutorial_ConstrCanal()); } else { TutorialManager tutMan = GameObject.FindGameObjectWithTag("Tutorial").GetComponent <TutorialManager> (); tutMan.startTuto(new Tutorial_ConstrDelete()); } }
// Use this for initialization void Start() { rend = GetComponent <Renderer>(); //rend.material = mats[0]; text = GetComponent <TextMeshPro>(); tutorialManager = GameObject.Find("TutorialManager").GetComponent <TutorialManager>(); //text.color = textColor[0]; scaleXOriginal = progressBar.transform.localScale.x - .05f; scaleXCurrent = 0; progress = 0; }
public void Initial(int index, int id, bool isAI, string nickName) { int wait = 1; if (SceneManager.GetActiveScene().name == "Tutorial") { wait = 0; } CoroutineUtility.GetInstance() .Do() .Wait(wait) .Then(() => SpawnAnimation.SetActive(true)) .Wait(0.3f) .Then(() => playerSprite.SetActive(true)) .Wait(1f) .Then(() => SpawnAnimation.SetActive(false)) .Go(); this.isAI = isAI; if (PhotonManager.getInstance().playerList == null) { PhotonManager.getInstance().playerList = new List <PlayerController>(); } PhotonManager.getInstance().playerList.Add(this); ID = id; this.index = index; this.NickName = nickName; PlayerNameText.text = nickName; if (isOwner()) { OnSceneLoaded(); MainGameManager.getInstance().player = this; if (SceneManager.GetActiveScene().name == "Tutorial") { TutorialManager.GetInstance().player = this; } //MainUIManager.instance.UpdateHealthBar(hp); SaveData playerData = EntireGameManager.getInstance().playerData; SetCharacterSprite(playerData.nowEquipment.animal, playerData.nowEquipment.cup, playerData.nowEquipment.liquid); gameObject.GetPhotonView().RPC("SetCharacterSprite", PhotonTargets.All, playerData.nowEquipment.animal, playerData.nowEquipment.cup, playerData.nowEquipment.liquid); GameObject inputer = PhotonNetwork.Instantiate("FakeInputer", Vector3.zero, Quaternion.identity, 0); fakeInputer = inputer.GetComponent <FakeInputer>(); fakeInputer.playerID = id; inputer.GetPhotonView().RPC("SetID", PhotonTargets.MasterClient, id); gameObject.GetPhotonView().RPC("SetSkill", PhotonTargets.All, playerData.nowEquipment.animal); } else if (isAI && PhotonNetwork.isMasterClient) { OnSceneLoaded(); } }
void Start() { _tutMan = GameObject.FindGameObjectWithTag("Tutorial").GetComponent <TutorialManager> (); if (m_workerCounterText == null) { GameObject workerCounter = GameObject.Find("WorkerCounter"); m_workerCounterText = workerCounter.transform.FindChild("WorkerCounterText").GetComponent <Text>(); } WorkerManager.GetInstance().addOnWorkerChangeListener(updateCounter); TimeManager timeManager = GameObject.FindGameObjectWithTag("Logic").GetComponent <TimeManager>(); timeManager.addListenerToMonthChange(updateCounter); updateCounter(); }
void Awake() { initBase(); _confirmButton = transform.FindChild("BuildingConfirmPanel").FindChild("Button_SI").GetComponent <Button>(); _tutMan = GameObject.FindGameObjectWithTag("Tutorial").GetComponent <TutorialManager> (); if (_tutMan.getState() != TutorialManager.STATES.END) { transform.FindChild("BuildingConfirmPanel").FindChild("Button_Cancela").GetComponent <Button> ().interactable = false; } confirmDisabled = false; }
public override void show() { base.show(); if (TutorialManager.isTutorialOpen("T48") || TutorialManager.isTutorialOpen("T49") || TutorialManager.isTutorialOpen("T50")) { } else { stageDetail.hide(); } stageClearRewardPopup.hide(); nowPlayingWalkAnimation = false; GameManager.setTimeScale = 1.0f; createMapPlayer(); if (GameDataManager.instance.maxAct >= 3) { spInstantDungeon.color = Color.white; } else { spInstantDungeon.color = btnHell.disabledColor; } if (GameManager.me.stageManager.isRepeatGame == false && GameManager.me.stageManager.playStage == 5 && GameDataManager.instance.maxStage == 1) { } else { createMapMonster(); } if (GameManager.me.successType.Get() != null && GameManager.me.successType == WSDefine.GAME_SUCCESS && DebugManager.useTestRound == false && GameManager.me.stageManager.nowPlayingGameType == GameType.Mode.Epic) { } else { refresh(); } showFriends(); }
public override void Awake() { base.Awake(); _trailRenderer = GetComponentInChildren <TrailRenderer>(); _soundManager = FindObjectOfType <SoundEffectManager>(); _rigidbody = GetComponent <Rigidbody2D>(); _cameraScript = Camera.main.GetComponent <CameraScript>(); tm = FindObjectOfType <TutorialManager>(); _transform = transform; _timeManager = FindObjectOfType <TimeManager>(); _renderer = GetComponent <SpriteRenderer>(); _scoreManager = FindObjectOfType <ScoreManager>(); }
// Init private void Awake() { stateManager = gameObject.GetComponent <StateManager>(); counterManager = gameObject.GetComponent <CounterManager>(); itemManager = gameObject.GetComponent <ItemManager>(); cameraManager = gameObject.GetComponent <CameraManager>(); storageManager = gameObject.GetComponent <StorageManager>(); itemInteractions = gameObject.GetComponent <ItemInteractions>(); soundManager = GameObject.FindGameObjectWithTag("Sound").GetComponent <SoundManager>(); tutorialManager = gameObject.GetComponent <TutorialManager>(); tutorialState = GameObject.FindGameObjectWithTag("TutorialState").GetComponent <TutorialState>(); chef = GameObject.FindGameObjectWithTag("Chef"); selectorController = GameObject.FindGameObjectWithTag("Selector").GetComponent <SelectorController>(); }
public Building_Planter(JSONNode data, BUILDINGS type) : base(data, type) { _tutMan = GameObject.FindGameObjectWithTag("Tutorial").GetComponent <TutorialManager> (); _stateImgs = new Dictionary <STATE, string> (); foreach (STATE state in Enum.GetValues(typeof(STATE))) { _stateImgs[state] = data["states"][state.ToString()]; } _sembrat = false; _diesSembrat = 0; changeToState(STATE.EMPTY, false); _plantes = 0; //_maxPlantes = (uint) (getCapacity1 () * WorldTerrain.GetInstance().getTotalTilesInAChunk()) + InvestigationManager.GetInstance().getPlanterCapacityBonus(); }
public LocalPlayerDataMediator(CPDataEntityCollection dataEntityCollection, TutorialManager tutorialManager) { this.dataEntityCollection = dataEntityCollection; this.tutorialManager = tutorialManager; resetProfileDataChanges(); if (dataEntityCollection.LocalPlayerHandle.IsNull) { dataEntityCollection.EventDispatcher.AddListener <DataEntityEvents.EntityAddedEvent>(onEntityAdded); } else { onLocalPlayerHandleAdded(dataEntityCollection.LocalPlayerHandle); } }
private void OnEnable() { if (_Instance == null) { _Instance = this; } else { Debug.LogError("ERROR: Instance Already Exists"); } QuestionUIManager.OnEventDialogueFinished += CheckIfEndTutorial; QuestionUIManager.OnEventDialogueFinished += SpawnNextTutorialAudience; }
private void Awake() { if (Instance == null) { Instance = this; InitState = InitializationState.Initializing; LevelManager.OnLevelNeedReset += Reset; MouseManager.OnPlayerClick += ReadNextStep; } else { Destroy(gameObject); } }
public void rifleInit() { squad = GetComponent<TutorialManager>(); gameLogic = GameObject.Find("GameLogic").GetComponent<Tutorial>(); squad.size = 5; squad.attackDistance = 20; squad.movementDistance = 40; squad.squadType = "Rifle"; squad.unitTargets = new Transform[squad.size]; for (int i = 0; i < squad.size; i++) { squad.unitTargets[i] = new GameObject().transform; squad.unitTargets[i].parent = transform; squad.unitTargets[i].localPosition = Quaternion.Euler(0, i * 360 / squad.size, 0) * Vector3.forward * 1.5f; } GameObject unitPrefab = (GameObject)Resources.Load("Unit"); if (unitPrefab == null) throw new MissingReferenceException("Failed to find Unit Prefab."); squad.units = new GameObject[squad.size]; for (int i = 0; i < squad.size; i++) { squad.units[i] = (GameObject)Instantiate(unitPrefab, squad.unitTargets[i].position, Quaternion.identity); squad.units[i].transform.position = squad.unitTargets[i].position; squad.units[i].GetComponent<UnitManager>().power = BalanceConstants.Stats.BASIC_POWER; } squad.units[squad.units.Length - 1].GetComponent<UnitManager>().power *= 2; squad.units[squad.units.Length - 1].GetComponent<UnitManager>().isSpecial = true; squad.units[squad.units.Length - 1].transform.localScale = new Vector3(1.25f, 1.25f, 1.25f); squad.unitAbility = new TutorialManager.Ability(grenade); squad.squadAbility = new TutorialManager.Ability(retreat); squad.unitAbilityUpdate = new TutorialManager.AbilityUpdate(grenadeUpdate); squad.squadAbilityUpdate = new TutorialManager.AbilityUpdate(retreatUpdate); squad.paintColor(); }
// Use this for initialization void Start() { tutMan = GameObject.FindGameObjectWithTag("Manager").GetComponent<TutorialManager>(); gameMan = tutMan.GetComponent<GameManager>(); transitionCurve = new AnimationCurve(new Keyframe(0, 0), new Keyframe(.5f, 1.15f, -.3f, -.3f), new Keyframe(1.0f, 1.0f)); allRends = GetComponentsInChildren<Renderer>(); // turn all renderer's alphas down foreach (Renderer rend in allRends) { Color hold = rend.material.color; hold.a = 0; rend.material.color = hold; } // if this is the super step, give the player full super if (stepType == TutorialStepType.T_Super) { plCont = gameMan.playerObjs[0].GetComponent<PlayerController>(); plCont.currCharge = plCont.maxCharge; } // if this is time delay, just pretend like we immediately passed the step if (stepType == TutorialStepType.T_TimeDelay) { stepPassed = true; } // if this is move, just get their pos if (stepType == TutorialStepType.T_Move) { savePos = gameMan.playerObjs[0].transform.position; } // and set initial position startPos = transform.position; transform.position = offsetPos = startPos + offsetZ; }
// Use this for initialization protected virtual void Start() { impMan = GameObject.FindGameObjectWithTag("Manager").GetComponent<ImpactManager>(); gameMan = impMan.GetComponent<GameManager>(); tutMan = impMan.GetComponent<TutorialManager>(); mTrans = transform; }
IEnumerator Slide_Coroutine(TutorialManager.Slide slide, bool hideMenu=true, Textbox.TutorialBoxPosition boxPos=Textbox.TutorialBoxPosition.BOTTOM) { if (hideMenu) { GameManager.instance.transform.Find("Menu_layout").gameObject.SetActive(false); } GameObject.Find("Canvas/Slide").gameObject.GetComponent<Image>().sprite = Resources.Load<Sprite>(slide.imageName); if (slide.text != null && slide.text != "") { yield return new WaitForSeconds(1f); CreateTutorialBox(slide.text, boxPos, slide.timer - 1f); yield return null; } yield return new WaitForSeconds(slide.timer); }
private void initializeTutorialManager() { this.TutorialManager = new TutorialManager(this, this.timerEntryListView.Timer, this.tutorialPanel); }
public static bool UpdateTarget(TutorialManager me) { if (Input.GetButtonUp("R1") && targetsInRange.Count > 0) { gameLogic.attackProj.enabled = false; gameLogic.changeUnit.enabled = false; if (selectedTargetIndex >= 0) { targetsInRange[selectedTargetIndex].SendMessage("disableTarget"); //targetsInRange[selectedTargetIndex].GetComponent<NetworkView>().RPC("disableLight", RPCMode.All); } selectedTargetIndex++; selectedTargetIndex %= targetsInRange.Count; targetsInRange[selectedTargetIndex].SendMessage("enableTarget"); //targetsInRange[selectedTargetIndex].GetComponent<NetworkView>().RPC("enableLight", RPCMode.All); Vector3 enemyPos = targetsInRange[selectedTargetIndex].transform.position; //gameLogic.changeUnit.transform.position = new Vector3(enemyPos.x, 9, enemyPos.z); //gameLogic.changeUnit.enabled = true; } else if (Input.GetButtonUp("L1") && targetsInRange.Count > 0) { gameLogic.attackProj.enabled = false; if (selectedTargetIndex >= 0) { targetsInRange[selectedTargetIndex].SendMessage("disableTarget"); //targetsInRange[selectedTargetIndex].GetComponent<NetworkView>().RPC("disableLight", RPCMode.All); } else selectedTargetIndex = 0; selectedTargetIndex--; if (selectedTargetIndex < 0) selectedTargetIndex = targetsInRange.Count - 1; { targetsInRange[selectedTargetIndex].SendMessage("enableTarget"); //targetsInRange[selectedTargetIndex].GetComponent<NetworkView>().RPC("enableLight", RPCMode.All); } Vector3 enemyPos = targetsInRange[selectedTargetIndex].transform.position; //gameLogic.changeUnit.transform.position = new Vector3(enemyPos.x, 9, enemyPos.z); //gameLogic.changeUnit.enabled = true; } if (Input.GetButtonUp("Cross") && targetsInRange.Count > 0 && selectedTargetIndex >= 0) { return true; } return false; }
void Start() { DontDestroyOnLoad(transform.gameObject); osc = gameObject.GetComponent<OSCInterface>(); SetState (GameState.STANDBY); tutorialMessages.Add ("1"); tutorialMessages.Add ("2"); tutorialMessages.Add ("3"); if( winterObjects != null ) winterObjects.SetActive (true); if (debugMode) debugSword.SetActive (true); else debugSword.SetActive (false); tm = GameObject.FindGameObjectWithTag ("TutorialManager").GetComponent<TutorialManager> (); //holoDeckSound.Play (); }
// Use this for initialization void Start() { Instance = this; walltop = FindObjectOfType(typeof(InvisibleWallTop)) as InvisibleWallTop; gameManager = GameManager.instance; tutorialManager = TutorialManager.instance; EventManager.OnNPC += HandleNPC; source = GetComponent<AudioSource>(); source.volume = WalkVolume; if (source.volume == 0) source.volume = 0.5f; }
void FindComponent() { if (tutorial_manager_ != null) return; foreach (var player in FindObjectsOfType<PlayerSetting>()) { if (!player.isLocalPlayer) continue; tutorial_manager_ = player.GetComponentInChildren<TutorialManager>(); } }
void Start() { tutorialManager = TutorialManager.instance; gameManager = GameManager.instance; }
public static void updateAoE(TutorialManager me, ref bool activated) { gameLogic.attackProj.transform.position = new Vector3(marker.transform.position.x, 9, marker.transform.position.z); if (Input.GetButtonUp("Cross")) { activated = true; if(markerAttack > 0) findTargets(marker.gameObject, markerAttack); Camera.main.GetComponent<CameraController>().setCameraTarget(me.transform.position, true); } if (Input.GetButtonDown("Circle")) { reset(); Camera.main.GetComponent<CameraController>().setCameraTarget(me.transform.position, true); } }
public void CueTutorialMessage(TutorialManager.TutorialEvent evt) { CueTutorialMessage(evt, null); }
public ExperimentParameters(bool included, TutorialManager tutorialManager) { this.Included = included; this.TutorialManager = tutorialManager; }
public void CueTutorialMessage(TutorialManager.TutorialEvent evt, object arg0, object arg1) { if (TutManager != null) TutManager.NotifyReady(evt, arg0, arg1); }
public void CueTutorialMessage(TutorialManager.TutorialEvent evt, object arg0) { CueTutorialMessage(evt, arg0, null); }
public static void registerTutorialManager(TutorialManager tm) { tutorialManager = tm; }
private void layoutComponents() { Timer timer = new Timer(this); Field field; Point scenter; components.Add(timer); Rectangle tsa = FacetManager.GraphicsDevice.Viewport.TitleSafeArea; if (SinglePlayer) { int x = tsa.Center.X - Field.Width / 2; int y = tsa.Y; field = new Field(this, x, y); field.Player = InputManager.ActivePlayer; field.LoadContent(); field.Level = level; components.Add(field); fields.Add(field); scenter = new Point( (field.Area.Right + tsa.Right) / 2, (tsa.Bottom - Layout.BottomBuffer - Layout.StatusOneHeight / 2) ); StatusDisplay status = new StatusDisplay(field, scenter); components.Add(status); Rectangle boxarea = new Rectangle(status.Area.X + Block.Width / 2, status.Area.Y - Block.Height * 2, status.Area.Width, Block.Height * 2); SelectionBox box = new SelectionBox(field, boxarea); components.Add(box); timer.Center = new Point( (field.Area.Left + tsa.Left) / 2, (tsa.Top + status.Area.Top) / 2); TutManager = new TutorialManager(this, SinglePlayerField.Area); CueTutorialMessage(TutorialManager.TutorialEvent.Intro, field.Target); } else { // 1 Player int x = tsa.X; int y = tsa.Y; field = new Field(this, x, y); field.Player = InputManager.ActivePlayer; field.LoadContent(); components.Add(field); fields.Add(field); scenter = new Point(tsa.Center.X, tsa.Top + Layout.StatusOneHeight / 2); StatusDisplay status = new StatusDisplay(field, scenter); components.Add(status); Rectangle boxarea = new Rectangle(field.Area.Right, field.Area.Y, Block.Width * 9, Block.Height); boxarea.X += (field.Area.Width - boxarea.Width) / 2; SelectionBox box = new SelectionBox(field, boxarea); components.Add(box); // 2 Player x = tsa.Right - Field.Width; y = y; field = new Field(this, x, y); field.Player = null; field.LoadContent(); components.Add(field); fields.Add(field); scenter = new Point(tsa.Center.X, tsa.Bottom - Layout.StatusTwoHeight / 2); status = new StatusDisplay(field, scenter); components.Add(status); boxarea = new Rectangle(field.Area.X - Block.Width * 7, field.Area.Bottom, Block.Width * 9, Block.Height); boxarea.X += (field.Area.Width - boxarea.Width) / 2; box = new SelectionBox(field, boxarea); components.Add(box); timer.Center = tsa.Center; } }
// Use this for initialization void Start() { if (instance != null) { Destroy(this.gameObject); return; } instance = this; DontDestroyOnLoad(this.gameObject); //gameManager = GameManager.instance; slides = new List<Slide>() { /*0*/ new Slide("Slide1", 3, "\"Hey Kelly! Help us out here!\""), /*1*/ new Slide("Slide2", 3, "\"Yeah Chelsey, go help 'em. I'm too lazy to go.\""), /*2*/ new Slide("Slide3", 3, "\"Alright...\""), /*3*/ new Slide("Slide5", 3, ""), /*4*/ new Slide("Slide6", 3, ""), /*5*/ new Slide("Slide7", 3, ""), /*6*/ new Slide("Slide13", 3, "\"Alfred...!\nIf I could… if only I could go back in time…\""), /*7*/ new Slide("Slide14", 3, "\"What... is going on...\nThis all seems too familiar...\""), /*8*/ new Slide("Slide15", 5, "\"Happy Wednesday, class, my name is Megan Freewoman. \nUnfortunately, Mr. Ly is out today, so I’ll be your literature sub for today.\""), /*9*/ new Slide("Slide16", 3, "\"I was at Jeney's this morning...\nif you buy one, you'll get another one free!\""), /*10*/new Slide("Slide17", 3, "\"Oooooh...Yes...\""), /*11*/new Slide("Slide18", 5, "\"...So let me ask this, how many of you are into time travels?\n...if I could, I'd go back to 2 years from today, right before I was hospitalized.\""), }; gameManager = GameManager.instance; HideGameManager(); gameManagerObject = GameObject.Find("GameManager"); sm = gameManagerObject.GetComponent<SceneManager>(); StartCoroutine(Start_Tutorial()); }