public MainManager(IView view, PortHandler port) { _view = view; _port = port; view.GoGo += _GoGoFun; view.Stop += _StopFun; }
void Start() { Debug.LogError("This message will make the console appear in Development Builds"); portdata = GameObject.Find("EventSystem").GetComponent <PortHandler>(); parentCanvas = GameObject.Find("Canvas"); line = transform.Find("Linerenderer"); graphWidth = transform.Find("Linerenderer").GetComponent <RectTransform>().rect.width; graphHeight = transform.Find("Linerenderer").GetComponent <RectTransform>().rect.height; newLineRenderer = GetComponentInChildren <LineRenderer>(); newLineRenderer.SetVertexCount(vertexAmount); xInterval = graphWidth / vertexAmount; for (int i = 0; i < 101; i++) { data.Add(0); } }
void Awake() { Rigidbody = GetComponent <Rigidbody>(); Ports = GameObject.Find("EventSystem").GetComponent <PortHandler>(); center = new Vector2(Screen.width / 2, Screen.height / 2); }