// Use this for initialization void Start() { player = GameObject.Find("RPlayer").GetComponent <Player> (); bob = GameObject.Find("Bob").GetComponent <Bob> (); robo = GameObject.Find("Robo-Jake").GetComponent <RoboJake> (); dogBot = GameObject.Find("DogBot-Bobby").GetComponent <DogBotBobby> (); dron = GameObject.Find("DronAK-1400").GetComponent <Dron> (); litus = GameObject.Find("Litus").GetComponent <Litus> (); sharot = GameObject.Find("Sharot").GetComponent <Sharot> (); mateo = GameObject.Find("Mateo Rodriguez").GetComponent <Mateo> (); bik = GameObject.Find("BikKlubber the Merc.").GetComponent <Bik> (); laser = GameObject.Find("Laser Automata").GetComponent <Laser> (); weaponR = GameObject.Find("WeaponRandom").GetComponent <WeaponRandom> (); weapon01 = GameObject.Find("WeaponsCode").GetComponent <Weapon01> (); weapon02 = GameObject.Find("WeaponsCode").GetComponent <Weapon02> (); weapon03 = GameObject.Find("WeaponsCode").GetComponent <Weapon03> (); ability01 = GameObject.Find("Abilities").GetComponent <Abilitie01_PlasmaGranade> (); ability04 = GameObject.Find("Abilities").GetComponent <Abilitie04_GoldShot> (); mainScript = GameObject.Find("Main Camera").GetComponent <monsterHp> (); backgroundB = GameObject.Find("Ascensor").GetComponent <BackgroundBehavior> (); soundEffectsBtn = GameObject.Find("SoundEffectsButtonCode").GetComponent <StopSoundEffectsButton> (); BgMusicBtn = GameObject.Find("BgMusicButtonCode").GetComponent <StopBgMusicButton> (); offlineIncome = GameObject.Find("OfflineIncome").GetComponent <OfflineIncome> (); variablesToLoad(); }
// Metodo para calcular el dano void partnerDamage() { mainScript = mainScript.GetComponent <monsterHp> (); monster = monster.GetComponent <Monster> (); if (atkSpeedCount < atkSpeed) { atkSpeedCount += Time.deltaTime; mainScript.partnerAtkActivation = true; if (atkSpeedCount >= atkSpeed) { atkSpeedCount = 0; mainScript.partnerAtkActivation = false; } } if (atkSpeedCount == 0) { Instantiate(attack, attackPosition.transform.position, Quaternion.identity); } }
// Use this for initialization void Start() { tapButton = GameObject.Find("TapButtonCode").GetComponent <TapButton> (); mainScript = mainScript.GetComponent <monsterHp>(); }