private void Awake() { fogCamera = FindObjectOfType <FogCamera>(); systemUI = FindObjectOfType <SystemUI>(); speedUI = FindObjectOfType <SpeedUI>(); hud = FindObjectOfType <HUD>(); }
//Speed does not have a bool value since it can be change runtime without recreate everything public void ChangeSpeed() { Text text = SpeedUI.GetComponent <Text>(); Slider slider = SpeedUI.transform.GetChild(0).GetComponent <Slider>(); timer = 2 - slider.value; text.text = "Speed: " + slider.value; }
// Start is called before the first frame update void Start() { so = SocketObject.Instance; dw = DataWorker.Instance; gm = GameManager.Instance; a = AttackUI.GetComponent <filledImage> (); d = DiffenceUI.GetComponent <filledImage> (); s = SpeedUI.GetComponent <filledImage> (); }
public event OnLeaveSystem onLeaveSystem; // instantiate an observer set void Start() { if (systemLocation) { transform.position = systemLocation.transform.position; } currentEmpire = gameObject.GetComponentInParent <Empire>(); universe = FindObjectOfType <Universe>(); speedUI = FindObjectOfType <SpeedUI>(); blocking = false; }
void Start() { //healthUI = GetComponentInChildren<HealthUI>(); shieldsUI = GetComponentInChildren <ShieldsUI>(); speedUI = GetComponentInChildren <SpeedUI>(); numUI = GetComponentInChildren <NumUI>(); //healthBar = healthUI.healthBar; shieldsBar = shieldsUI.shieldsBar; speedBar = speedUI.speedBar; healthNum = numUI.healthNum; }
void SpeedTurn() { SpeedUI.SetActive(true); ItemUI.SetActive(false); text.text = chooseSpeedText; }
// Update is called once per frame private void Awake() { speedUI = FindObjectOfType <SpeedUI>(); targetTransform = FindObjectOfType <TargetTransform>().transform; meshRenderer = GetComponentInChildren <MeshRenderer>(); }