Ejemplo n.º 1
0
        public static void Match(int n, int block1, int block2, float time)
        {
            Line[n] = FindObjectOfType <GameUiCreator>().CreateLine(_parent);

            var p1 = TranslateTablePositionToVector2(block1 / 7, block1 % 7);
            var p2 = TranslateTablePositionToVector2(block2 / 7, block2 % 7);
            var p3 = new Vector2 {
                x = (p1.x + p2.x) / 2, y = (p1.y + p2.y) / 2
            };
            var p4 = new Vector2 {
                x = (p3.x + p1.x) / 2, y = (p3.y + p1.y) / 2
            };

            GameUiChanger.SetPosition(Line[n], p4);
            GameUiChanger.ChangePosition(Line[n], p3, time);
        }
Ejemplo n.º 2
0
        public static void SetPosition(BlockData block, int x, int y)
        {
            var z = TranslateTablePositionToVector2(x, y);

            GameUiChanger.SetPosition(block.rectTransform, z);
        }