void Start () { swipeVector = SwipeVector.GetTraceVector(); playerCollider = GetComponent<Collider2D>(); playerMotor = GetComponent<PlayerMotor>(); }
void Start () { lrenderer = GetComponent<LineRenderer>(); sing_TraceVector = GetComponent<SwipeVector>(); ArrowEnd = transform.FindChild("ArrowHead"); LengthText = transform.FindChild("LengthText"); LengthTextMesh = LengthText.GetComponent<TextMesh>(); }
// Get singleton method? // public static SwipeVector GetTraceVector() { if (sing_TraceVector == null) { sing_TraceVector = FindObjectOfType<SwipeVector>(); } return sing_TraceVector; }