/// <summary> /// Method used to rotate back card (when 2 returned cards aren't identical) /// And translate it to the board /// </summary> public void RotateBackCard() { //GetComponent<Collider>().enabled = false; StartCoroutine(CoroutineClass.Rotation(transform, new Vector3(0, 180, 0), StaticParameterClass.SpeedLevel + 0.1f)); StartCoroutine(CoroutineClass.Translation(transform, transform.position, source, 1.0f, CoroutineClass.MoveType.Time)); //GetComponent<Collider>().enabled = true; }
/// <summary> /// Method used to rotate card from a Coroutine /// And translate card closer than the player /// </summary> public void RotateCard() { StartCoroutine(CoroutineClass.Translation(transform, transform.position, transform.position - destination, 0.2f, CoroutineClass.MoveType.Time)); StartCoroutine(CoroutineClass.Rotation(transform, new Vector3(0, 180, 0), 0.5f)); }