public void Start() { PS = GameObject.FindGameObjectWithTag("Grid").GetComponent <Placement>(); BM = GameObject.FindWithTag("GM").GetComponent <buildmanager>(); ST = GameObject.FindWithTag("GM").GetComponent <PlayerStats>(); returnMoney = returnMoneyB; }
void Start() { //creates the build manager singleton. buildmanager_script = buildmanager.S; //gets the renderer of this building spot. rendr = GetComponent <Renderer>(); //save the original color information. original_color = rendr.material.color; }
public void Awake() { if (instance != null) { Debug.LogError("more than one buildmanager"); return; } instance = this; }
void Awake() { if (instance != null) { Debug.LogError("More than one Buildermanager in scene!"); return; } instance = this; }
public void Start() { BM = GameObject.FindWithTag("GM").GetComponent <buildmanager>(); PS = GameObject.FindWithTag("Shop").GetComponent <shop>(); ST = GameObject.FindWithTag("GM").GetComponent <PlayerStats>(); rend = GetComponent <SpriteRenderer>(); startcolor = rend.material.color; }
// Use this for initialization void Start() { AstarPath.active.AddWorkItem(new AstarWorkItem(() => { // Safe to update graphs here var node = AstarPath.active.GetNearest(transform.position).node; node.Walkable = false; })); rend = GetComponent <Renderer>(); start_color = rend.material.color; buildmanager = buildmanager.instance; }
void Start() { buildmanager = buildmanager.instance; if (FireTurret.Buttom != false) //Road spawn manager have shop script,but no turret imformation assign { InvokeRepeating("UpdateButtom", 0, 0.2f); BloodTurret.turretcost.text = '$' + BloodTurret.cost.ToString(); standardTurret.turretcost.text = '$' + standardTurret.cost.ToString(); if (Unlock.FireElement) { FireTurretBlock.SetActive(false); FireTurret.Buttom.SetActive(true); FireTurret.turretcost.text = '$' + FireTurret.cost.ToString(); } if (Unlock.IceElement) { IceTurret.Buttom.SetActive(true); IceTurretBlock.SetActive(false); IceTurret.turretcost.text = '$' + IceTurret.cost.ToString(); } if (Unlock.HolyElement) { HolyTurret.Buttom.SetActive(true); HolyTurretBlock.SetActive(false); HolyTurret.turretcost.text = '$' + HolyTurret.cost.ToString(); } if (Unlock.LavaElement) { LavaTurret.Buttom.SetActive(true); LavaTurretBlock.SetActive(false); LavaTurret.turretcost.text = '$' + LavaTurret.cost.ToString(); } if (Unlock.FrozeElement) { FrozeTurret.Buttom.SetActive(true); FrozeTurretBlock.SetActive(false); FrozeTurret.turretcost.text = '$' + FrozeTurret.cost.ToString(); } if (Unlock.MoneyElement) { MoneyTurret.Buttom.SetActive(true); MoneyTurretBlock.SetActive(false); MoneyTurret.turretcost.text = '$' + MoneyTurret.cost.ToString(); } } }
void Start() { BM = GameObject.FindObjectOfType <buildmanager>(); if (BM.isTutor) { if (TutorFightV2.OverCapture) { return; } GameObject.FindObjectOfType <TutorFightV2>().CaptureTutor(); // TutorFightV2.OverCapture = true; if (GameObject.FindObjectOfType <CameraControlOff>().NowWatchEnemyArea) { GameObject.FindObjectOfType <CameraControlOff>().ChangeView(); BM.ChangeView(); } } CaptrueEffect = Instantiate(CaptrueEffectPrefab, transform.position, Quaternion.identity); CaptrueEffect.transform.parent = gameObject.transform; CaptrueEffect.transform.position += new Vector3(0, 4, 0); CaptrueEffect.transform.localScale = new Vector3(8, 8, 8); }
void Awake() { S = this; }
private void Start() { bu = build.GetComponent <buildmanager>(); }
void Start() { buildmanager_script = buildmanager.S; }