private void Update() { Fsm.Update(); UiCardMovement.Update(); UiCardRotation.Update(); UiCardScale.Update(); }
//-------------------------------------------------------------------------------------------------------------- #region Unity Callbacks private void Awake() { //components MyTransform = transform; MyCollider = GetComponent <Collider>(); MyRigidbody = GetComponent <Rigidbody>(); MyInput = GetComponent <IMouseInput>(); Hand = transform.parent.GetComponentInChildren <IUiCardHand>(); MyRenderers = GetComponentsInChildren <SpriteRenderer>(); MyRenderer = GetComponent <SpriteRenderer>(); //transform UiCardScale = new UiCardScale(this); UiCardMovement = new UiCardMovement(this); UiCardRotation = new UiCardRotation(this); //fsm Fsm = new UiCardHandFsm(MainCamera, CardConfigsParameters, this); }
//-------------------------------------------------------------------------------------------------------------- #region Transform public void RotateTo(Vector3 rotation, float speed) { UiCardRotation.Execute(rotation, speed); }