private void SearchForceManager() { foreach (var e in this.EntityManager.AllEntities) { var f = e.FindComponent <ForcesManager>(); if (f != null) { this.forcesManager = f; break; } } }
// Use this for initialization void Start() { forces = GetComponent<ForcesManager>(); body = GetComponent<Rigidbody>(); rayman = GetComponent<CartRaycastManager>(); tires = GetComponent<TireManager>(); curFwd = transform.forward; curNormal = transform.up; body.constraints = RigidbodyConstraints.FreezeRotation; }
void Start() { forces = GetComponent<ForcesManager>(); cart = GetComponent<CartManager>(); tires = GetComponent<TireManager>(); }