void Start() { Target = GameObject.Find("Sihir").transform; GameObject h = GameObject.Find("Sihir"); HPSihir = h.GetComponent <Hpsih> (); Music = h.GetComponent <SihirSounds> (); still_battle = false; already_music = false; hedgehog = gameObject.GetComponent <Animator> (); /*character = gameObject.AddComponent<CharacterController> (); * character.height = 0.01f; * character.radius = 0.01f;*/ /*character = gameObject.AddComponent<Rigidbody> (); * character.useGravity = true; * character.freezeRotation = true; * cols = gameObject.AddComponent<BoxCollider> ();*/ ch = gameObject.GetComponent <CharacterController> (); childcol = GameObject.Find("bigcrush 1(Clone)/idle/Bip001"); childcol.collider.enabled = true; health = HP; inipos = gameObject.transform.position; }
// Use this for initialization void Start() { Partes [i].renderer.enabled = true; collor2 = Imagem3.renderer.material.color; collor2.a = 1.0f; GameObject y = GameObject.Find ("Sihir"); Music = y.GetComponent <SihirSounds> (); }
// Use this for initialization void Start() { //Os gameobjects a seguir sao inicializados para conseguir componentes de outros scripts utilizando //as variaveis ja declaradas. GameObject f = GameObject.Find ("bigcrush 1(Clone)/idle"); fe = f.GetComponent<FollowEnemy> (); GameObject h = GameObject.Find ("Sihir"); HPSihir = h.GetComponent<Hpsih> (); trs = GameObject.Find ("Sihir"); Attack = h.GetComponent <SihirSounds> (); }
void Start() { //Os gameobjects a seguir sao inicializados para conseguir componentes de outros scripts utilizando //as variaveis ja declaradas. GameObject s = GameObject.Find ("SpellCast"); castspell = s.GetComponent<SpellCast> (); DesoxField = GameObject.Find ("desoxfield"); GameObject h = GameObject.Find ("Sihir"); hp = h.GetComponent<Hpsih> (); trsihir = GameObject.Find ("Sihir"); GameObject a = GameObject.Find ("Sihir"); SihirSounds = a.GetComponent <SihirSounds> (); }
// Use this for initialization void Start() { //Os gameobjects a seguir sao inicializados para conseguir componentes de outros scripts utilizando //as variaveis ja declaradas. GameObject f = GameObject.Find("bigcrush 1(Clone)/idle"); fe = f.GetComponent <FollowEnemy> (); GameObject h = GameObject.Find("Sihir"); HPSihir = h.GetComponent <Hpsih> (); trs = GameObject.Find("Sihir"); Attack = h.GetComponent <SihirSounds> (); }
// Use this for initialization void Awake() { //O objeto e inicializado com a cor vermelha. gameObject.renderer.material.color = Color.red; GameObject x = GameObject.Find ("Sihir"); TriggerSound = x.GetComponent <SihirSounds> (); //O GameObject F esta desativado na inicializaçao F.SetActive (false); //Ao ser inicializado, o script procurara o objeto e obtera o script desse objt. GameObject c = GameObject.Find ("CristalGrande"); cgrande = c.GetComponent<CristalGrande> (); }
// Use this for initialization void Start() { //O gameobject a seguir foi inicializado para conseguir componente de outro script utilizando //a variavel ja declarada. GameObject a = GameObject.Find("Sihir"); SihirSounds = a.GetComponent <SihirSounds> (); GameObject s = GameObject.Find("Sihir"); hp = s.GetComponent <Hpsih> (); rb = GetComponent <Rigidbody> (); //Para que a variavel consiga armazenar o Rigidbody do objeto. pos = 0f; //o pos começara no 0. pos = transform.localEulerAngles.y; //E sera igual ao Y do objeto. jumpsound = true; //bool para controlar o som de pulo. }
// Use this for initialization void Start() { //Os gameobjects a seguir sao inicializados para conseguir componentes de outros scripts utilizando //as variaveis ja declaradas. GameObject s = GameObject.Find ("SpellCast"); castspell = s.GetComponent<SpellCast> (); esferar = GameObject.Find ("boladear2"); GameObject t = GameObject.Find ("Sihir"); tr = t.GetComponent<TrueSihir> (); GameObject h = GameObject.Find ("Sihir"); hp = h.GetComponent<Hpsih> (); trsih = GameObject.Find ("Sihir"); GameObject a = GameObject.Find ("Sihir"); SihirSounds = a.GetComponent <SihirSounds> (); }
void Start() { Target = GameObject.Find ("Sihir").transform ; GameObject h = GameObject.Find ("Sihir"); HPSihir = h.GetComponent<Hpsih> (); Music = h.GetComponent<SihirSounds> (); still_battle = false; already_music = false; hedgehog = gameObject.GetComponent<Animator> (); /*character = gameObject.AddComponent<CharacterController> (); character.height = 0.01f; character.radius = 0.01f;*/ /*character = gameObject.AddComponent<Rigidbody> (); character.useGravity = true; character.freezeRotation = true; cols = gameObject.AddComponent<BoxCollider> ();*/ ch = gameObject.GetComponent<CharacterController> (); childcol = GameObject.Find ("bigcrush 1(Clone)/idle/Bip001"); childcol.collider.enabled = true; health = HP; inipos = gameObject.transform.position; }
// Use this for initialization void Start() { //O gameobject a seguir foi inicializado para conseguir componente de outro script utilizando //a variavel ja declarada. GameObject a = GameObject.Find ("Sihir"); SihirSounds = a.GetComponent <SihirSounds> (); GameObject s = GameObject.Find ("Sihir"); hp = s.GetComponent<Hpsih> (); rb = GetComponent<Rigidbody> ();//Para que a variavel consiga armazenar o Rigidbody do objeto. pos = 0f;//o pos começara no 0. pos = transform.localEulerAngles.y;//E sera igual ao Y do objeto. jumpsound = true;//bool para controlar o som de pulo. }
// Use this for initialization void Start() { //Os gameobjects a seguir sao inicializados para conseguir componentes de outros scripts utilizando //as variaveis ja declaradas. GameObject f = GameObject.Find ("screenFader"); fd = f.GetComponent<Fade> (); GameObject h = GameObject.Find ("OpeningHistory"); history = h.GetComponent<HistoriaControl> (); GameObject i = GameObject.Find ("inventario 2"); pause = i.GetComponent<Inventario> (); GameObject c = GameObject.Find ("Opening Cutscene"); cutsc = c.GetComponent<CutsceneControl> (); GameObject v = GameObject.Find ("Sihir"); SihirSounds = v.GetComponent<SihirSounds> (); //No inicio do jogo apenas a vida maxima dela esta ativada.. maxH.SetActive (true); AlmostMaxH.SetActive (false); HalfH.SetActive (false); AlmostEmptyH.SetActive (false); Empty.SetActive (false); }