private IEnumerator Move() { WebGM GM = FindObjectOfType <WebGM>(); Vector3 desiredPosition = new Vector3(transform.position.x, transform.position.y + moveDistance, transform.position.z); while (transform.position != desiredPosition) { transform.position = Vector3.MoveTowards(transform.position, desiredPosition, moveSpeed * Time.deltaTime); GM.transform.position = (Vector2)transform.position; yield return(new WaitForEndOfFrame()); } yield break; }
private void Awake() { GM = GetComponent <WebGM>(); }
private void Awake() { GM = GameObject.Find(gmName).GetComponent <WebGM>(); GM.EnablePanels(); }
protected virtual void Awake() { GM = FindObjectOfType <WebGM>(); }
protected virtual void Act(string value, WebGM GM) { }