//public Camera miniMapCamera; void Start() { playerGameObject = GameObject.FindGameObjectWithTag("Player"); if (playerGameObject == null) { Debug.Log("Could not find playergameobject"); } pScript = playerGameObject.GetComponent <playerControllerCopy>(); if (pScript == null) { Debug.Log("Could not find pscript"); } /* * miniMapUI = GameObject.FindGameObjectWithTag("MiniMap"); * if (miniMapUI == null) * Debug.Log("Could not find the minimapUI"); * * miniMapAnim = miniMapUI.GetComponent<Animator>(); * if (miniMapAnim == null) * Debug.Log("Could not find minimapAnim"); * * miniMapCamera = GameObject.FindGameObjectWithTag("MiniMapCamera"); * * if (miniMapCamera == null) * Debug.Log("Could not find the minimapCamera"); * miniMapCameraAnim = miniMapCamera.GetComponent<Animator>(); */ //onscreenIcon = Instantiate(indicatorIcon, indicatorIcon.transform.position, indicatorIcon.transform.rotation); //onscreenIcon.SetActive(false); //onscreenIcon.transform.parent = canvas.transform; }
void startTutorial() { Time.timeScale = 0f; GameObject player = GameObject.FindGameObjectWithTag("Player"); if (player == null) { Debug.Log("Could not find player"); } pScript = player.GetComponent <playerControllerCopy>(); if (pScript == null) { Debug.Log("Could not find pScript"); } iScript = player.GetComponentInChildren <InteractionControllerCopy>(); if (iScript == null) { Debug.Log("Could not find the ineteractioncontroller"); } GameObject[] monsters = GameObject.FindGameObjectsWithTag("Monster"); foreach (GameObject mons in monsters) { AudioSource roamSound = mons.transform.Find("Audio Source") .GetComponent <AudioSource>(); roamSound.enabled = false; } pScript.setInTutorial(true); iScript.setInTutorial(true); if (!tutorialStart) { //player. // vPlayer = GetComponentInChildren <VideoPlayer>(); if (vPlayer == null) { Debug.Log("Could not find video player"); } image = GetComponentInChildren <RawImage>(); if (image == null) { Debug.Log("Could not find image"); } Debug.Log((int)vPlayer.clip.width); Debug.Log((int)vPlayer.clip.height); rTexture = new RenderTexture((int)vPlayer.clip.width, (int)vPlayer.clip.height, 0); rTexture = new RenderTexture((int)vPlayer.clip.width, (int)vPlayer.clip.height, 0); vPlayer.targetTexture = rTexture; image.texture = rTexture; Vector3 scale = image.transform.localScale; scale.y = vPlayer.clip.height / (float)vPlayer.clip.width * scale.y; image.transform.localScale = scale; } }
// Use this for initialization void Start() { //impulseCooldown = 5.0f; //setImpulse = false; canHeal = false; setHealing = false; pController = GetComponentInParent <playerControllerCopy>(); if (pController == null) { Debug.Log("Could not find pController"); } popUpController = interactionPopUp.GetComponent <WorldSpaceObjectController>(); if (popUpController == null) { Debug.Log("Could not find worldspacecontroller"); } popUpController2 = interactionPopUp2.GetComponent <WorldSpaceObjectController>(); if (popUpController2 == null) { Debug.Log("Could not find worldspacecontroller"); } popUpController3 = interactionPopUp3.GetComponent <WorldSpaceObjectController>(); if (popUpController3 == null) { Debug.Log("Could not find worldspacecontroller"); } travHealingBarController = travHealingBar.GetComponent <WorldSpaceObjectController>(); if (travHealingBarController == null) { Debug.Log("Could not find travhealingbarcontroller"); } unlockAbilties(); createMonsterPopups(); createLightCountDowns(); //travSlider = Instantiate(travHealthPrefab, transform.position, Quaternion.identity); //travSlider.SetActive(false); healingSFX = GetComponent <AudioSource>(); if (healingSFX == null) { Debug.Log("Could not find the healing sound effect"); } isHealing = false; timeToHeal = .2f; currentHealTime = 0f; }
void Start() { //inTutorial = false; tacticalView = false; cameraMoving = false; cameraMovingBack = false; targetController = target.GetComponent <playerControllerCopy>(); if (targetController == null) { Debug.Log("Could not find targetcontroller!"); } }
// Use this for initialization void Start() { switcherScript = GetComponentInChildren <lantern_01_matswitcher>(); if (switcherScript == null) { Debug.Log("SwitcherScript is ull"); } GameObject player = GameObject.FindGameObjectWithTag("Player"); pScript = player.GetComponent <playerControllerCopy>(); GameObject traveller = GameObject.FindGameObjectWithTag("Traveller"); tMovement = traveller.GetComponent <travellerMovement>(); if (pScript == null) { Debug.Log("pScript is nnull"); } lampLight = GetComponentInChildren <Light>(); if (lampLight == null) { Debug.Log("Could not find light in child!"); } mfController = GetComponentInChildren <monsterFireController>(); if (mfController == null) { Debug.Log("Could not find monsterfire effect controoller"); } //startIntensity = lampLight.intensity; }
public bool isStart;// the first of the tutorial frame public void Start() { if (isStart && playTutorial()) { Destroy(gameObject); return; } camScript = m_Camera.GetComponent <RotateCamera>(); if (lockCamera) { camScript.inTutorial = true; } else { camScript.inTutorial = false; } pScript = player.gameObject.GetComponent <playerControllerCopy>(); if (pScript == null) { Debug.Log("could not find"); } if (isLookTutorial) { Invoke("setTextActive", 0.2f); Invoke("setTargetActive", 0.2f); setLookTutorial(); StartCoroutine("lookTutorial"); //OnDrawGizmosSelected(); } if (isMoveTutorial) { Invoke("setTextActive", 0.2f); setMoveTutorial(); StartCoroutine("moveTutorial"); } if (isLightTutorial) { Invoke("setTextActive", 0.2f); setLightTutorial(); StartCoroutine("lightTutorial"); } if (isIntermmediate) { Invoke("setTextActive", 0.2f); setIntermediatePhase(); StartCoroutine("intermeddiatePhase"); } if (isIntermmediateUnLock) { Invoke("setTextActive", 0.2f); setIntermediatePhaseUnlock(); StartCoroutine("intermeddiatePhase"); } if (isInfoTutorial) { Invoke("setTextActive", 0.2f); Invoke("setTargetActive", 0.2f); setInfoTutorial(); StartCoroutine("infoPhase"); } if (isLookTargetTutorial) { setLookTargetTutorial(); Invoke("lookAtTarget", 0.2f); StartCoroutine("lookTargetPhase"); } if (isMonsterTut) { Invoke("setTextActive", 0.2f); setInfoTutorial(); StartCoroutine("monsterTutPhase"); } }