void Start() { me = GetComponent<Entity>(); camControl = Cache.Get.cameraController; movement = me.Movement; touch.OnSwipe += OnSwipe; touch.OnTouch += OnTouch; }
void Start() { Vector3 angles = transform.eulerAngles; x = angles.y; y = angles.x; // Make the rigid body not change rotation if (GetComponent<Rigidbody>()) GetComponent<Rigidbody>().freezeRotation = true; targetMovement = target.GetComponent<CMovement>(); camera = GetComponent<Camera>(); }
void JustSpawned() { movement = GetComponent<CMovement>(); }
void Start() { me = GetComponentInParent<Entity>(); movement = me.Movement; }