void Start() { listFonts = GameObject.FindGameObjectsWithTag("LifePoint").ToList(); listSpawns = GameObject.FindGameObjectsWithTag("Spawner").ToList(); player = GameObject.FindGameObjectWithTag("Player"); game = GameObject.FindGameObjectWithTag("Game"); nextLevelObj = GameObject.FindGameObjectWithTag("NextLevel"); healthBar = player.GetComponent <HealthBarPlayer>(); sceneLoader = game.GetComponent <SceneLoader>(); nextLevel = nextLevelObj.GetComponent <NextLevel>(); playerCmd = player.GetComponent <PlayerComand>(); for (int i = 0; i < listFonts.Count; i++) { lifeFountain = listFonts[i].GetComponent <LifeFountain>(); } for (int j = 0; j < listSpawns.Count; j++) { handleText = listSpawns[j].GetComponent <HandleTextFile>(); spawnInt.Add(0); } for (int k = 0; k < listTotens.Count; k++) { ctrlMaterial = listTotens[k].GetComponent <ControllMaterial>(); } }
void Start() { Player = GameObject.FindGameObjectWithTag("Player"); playerComand = Player.gameObject.GetComponent <PlayerComand>(); healthBarPlayer = Player.gameObject.GetComponent <HealthBarPlayer>(); objRend = GetComponent <Renderer>(); objRend.material.shader = Shader.Find("Toon/Lit Dissolve Appear"); saveLoad = GameObject.FindGameObjectWithTag("Game"); if (!saveLoad.GetComponent <SaveLoadGame>().deuLoad) { hideObsList[objAtual].GetComponent <Renderer>().material = material[0]; firstCollider.enabled = false; //PlayerPrefs.SetInt("bridgeActive", 0); } else { //if (PlayerPrefs.GetInt("bridge_0_Active") == 1) //{ hideObsList[objAtual].GetComponent <Renderer>().material = material[1]; firstCollider.enabled = true; lerp = 1; //} } }
void Start() { Player = GameObject.FindGameObjectWithTag("Player"); playerComand = Player.gameObject.GetComponent <PlayerComand>(); healthBarPlayer = Player.gameObject.GetComponent <HealthBarPlayer>(); objRend = GetComponent <Renderer>(); objRend.material.shader = Shader.Find("Toon/Lit Dissolve Appear"); }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); seconds = 0; seconds2 = 0; timer2 = 0.0f; playerPrefab = GameObject.FindGameObjectWithTag("Player"); playerCmd = playerPrefab.GetComponent <PlayerComand>(); }
public void Start() { if (SaveLoadGame.instance.deuLoad == true) { hitpoint = SaveLoadGame.instance.recebeVida; } Player = GameObject.FindGameObjectWithTag("Player"); deusExiste = Player.gameObject.GetComponent <PlayerComand>(); UpdateHealthBar(); }
void Start() { Player = GameObject.FindGameObjectWithTag("Player"); cameraTarget = GameObject.FindGameObjectWithTag("Player"); lastPosition = new Vector3(cameraTarget.transform.position.x, cameraTarget.transform.position.y + Input.GetAxis("Horizontal"), cameraTarget.transform.position.z); offset = new Vector3(10, 4, 3); camTransform = transform; //handleTextFile = new HandleTextFile(); spawm = GameObject.FindGameObjectWithTag("Spawner"); //handleTextFile = spawm.GetComponent<HandleTextFile>(); playerCmd = Player.gameObject.GetComponent <PlayerComand>(); }
// Use this for initialization void Start() { //enemyRender = GameObject.FindGameObjectWithTag("Inimigo"); //rend = GetComponent<Renderer>(); //rend.material.shader = Shader.Find("Toon/Lit Dissolve"); player = GameObject.FindGameObjectWithTag("Player"); enemyList = new List <GameObject>(); enemyList = GameObject.FindGameObjectsWithTag("Inimigo").ToList(); //objects = GameObject.FindGameObjectWithTag("HideObj"); ctrlMaterial = totenKiller.GetComponent <ControllMaterial>(); enemyCtrl = GetComponent <EnemyController>(); playerCmd = player.GetComponent <PlayerComand>(); }
void Start() { //chieldObjs = gameObject.GetComponentsInChildren<GameObject>(); game = GameObject.FindGameObjectWithTag("Game"); Player = GameObject.FindGameObjectWithTag("Player"); playerComand = Player.gameObject.GetComponent <PlayerComand>(); healthBarPlayer = Player.gameObject.GetComponent <HealthBarPlayer>(); saveLoad = game.GetComponent <SaveLoadGame>(); spawmList = new List <GameObject>(); spawmList = GameObject.FindGameObjectsWithTag("Spawner").ToList(); for (int i = 0; i < spawmList.Count; i++) { spawmList[i].GetComponent <HandleTextFile>().morte(); //handleText = spawmList[i].GetComponent<HandleTextFile>(); } }
void Start() { //sphereCast = new SphereCast(); WriteText("test_", lines, columns); createMap("map"); selfSpawner = GameObject.FindGameObjectWithTag("Spawner").transform; enemPosition = new List <Vector3>(); playerPrefab = GameObject.FindGameObjectWithTag("Player"); gamePrefab = GameObject.FindGameObjectWithTag("Game"); playerCmd = playerPrefab.GetComponent <PlayerComand>(); saveLoad = gamePrefab.GetComponent <SaveLoadGame>(); sphereCast = playerCmd.GetComponent <SphereCast>(); // maneira a ser lida pelo editor da unity theSourceFile = new FileInfo("Assets\\StreamingAssets\\test_" + myId + ".txt"); //maneira para enviar para build //theSourceFile = new FileInfo("A Light Before - Prototype_Data\\StreamingAssets\\test_" + myId + ".txt"); reader = theSourceFile.OpenText(); //createEnemies("map"); //print("passou aqui"); //LoadText("map"); createEnemies(lines); for (int i = 0; i < enemyList.Count; i++) { enemyMatCtrl = enemyList[i].GetComponent <EnemyMatCtrl>(); } }
void Start() { Player = GameObject.FindGameObjectWithTag("Player"); playerRange = Player.gameObject.GetComponent <BoxCollider>(); healthBarPlayer = Player.gameObject.GetComponent <HealthBarPlayer>(); script = GetComponent <EnemyController>(); playerCmd = Player.gameObject.GetComponent <PlayerComand>(); lifeCmd = Player.gameObject.GetComponent <LifeComand>(); charCtrl = Player.GetComponent <CharacterController>(); inimigo = GetComponent <Inimigo>(); playerPos = GameObject.FindGameObjectWithTag("Player").transform; t = this.transform; cam = GameObject.FindGameObjectWithTag("MainCamera"); camShaker = cam.GetComponent <CameraShaker>(); mover = GetComponent <CharacterController>(); //awakeListener = Player.GetComponent<SphereCast>().awakeEnemies; //awakeListener.AddListener(WakeUp); //enemyAI_ref = GetComponent<EnemyAI>(); //rb = GetComponent<Rigidbody>(); }
// Use this for initialization void Start() { playerPrefab = GameObject.FindGameObjectWithTag("Player"); playerCmd = playerPrefab.GetComponent <PlayerComand>(); sphereCast = playerCmd.GetComponent <SphereCast>(); }
void Start() { Player = GameObject.FindGameObjectWithTag("Player"); playerCmd = Player.gameObject.GetComponent <PlayerComand>(); animator = GetComponent <Animator>(); }