11using System ;
22using System . Collections ;
33using System . Collections . Generic ;
4- //using System.Numerics;
54using UnityEngine ;
65
76public class Draw : MonoBehaviour
@@ -11,6 +10,16 @@ public class Draw : MonoBehaviour
1110 private Touch touch ;
1211 public int order ;
1312 public float [ ] lengths ;
13+ //if there is a better way pls tell me. I can only think about reading this from a file.
14+ public Vector2 [ , ] positions = { { new Vector2 ( 2.17f , 1.3f ) , new Vector2 ( 0.62f , 1.3f ) } , //back
15+ { new Vector2 ( - 0.92f , 2.13f ) , new Vector2 ( 0.51f , 1.37f ) } , //front
16+ { new Vector2 ( - 0.5f , 1.83f ) , new Vector2 ( - 1.74f , 1.22f ) } , //back leg top
17+ { new Vector2 ( - 1.74f , 1.22f ) , new Vector2 ( - 2.6f , 0.2f ) } , //back leg bottom
18+ { new Vector2 ( - 0.54f , 1.77f ) , new Vector2 ( - 1.26f , 0.09f ) } , //2nd leg (from the left)
19+ { new Vector2 ( 0.14f , 1.52f ) , new Vector2 ( - 0.53f , 0.84f ) } , //3rd leg top
20+ { new Vector2 ( - 0.53f , 0.84f ) , new Vector2 ( - 0.74f , 0.06f ) } , //3rd leg bottom
21+ { new Vector2 ( 0.47f , 1.24f ) , new Vector2 ( 0.06f , - 0.1f ) } , //4th leg
22+ { new Vector2 ( 1.8f , 1.18f ) , new Vector2 ( 1.88f , - 0.23f ) } } ; //5th leg
1423 void Start ( ) {
1524 //Set screen orientation
1625 Screen . orientation = ScreenOrientation . Landscape ;
@@ -21,7 +30,11 @@ void Start() {
2130
2231 void Update ( )
2332 {
24- if ( Input . touchCount > 0 ) {
33+ if ( order >= 9 ) {
34+ //Align lines into place
35+ StartVideo ( ) ;
36+ }
37+ else if ( Input . touchCount > 0 ) {
2538 touch = Input . GetTouch ( 0 ) ;
2639 Vector3 touchpos = Camera . main . ScreenToWorldPoint ( touch . position ) ;
2740 touchpos . z = 0 ;
0 commit comments