Пример #1
0
        public void changePoint(Point p, int s)
        {
            point = p;
            step  = s;

            var fromPosition = transform.position;
            var toPosition   = Point2Coord.point2coord(point, bottomPositionY + step * 0.4f);

            StartCoroutine(MoveAnimation(fromPosition, toPosition));
        }
Пример #2
0
        public void Init(Point p, bool mine)
        {
            step         = 0;
            isMoving     = false;
            isSelected   = false;
            point        = p;
            defaultPoint = p;
            isMine       = mine;

            transform.position = Point2Coord.point2coord(p, transform.position.y);
            if (isMine)
            {
                GetComponent <Renderer>().material.color = Color.black;
            }
            else
            {
                GetComponent <Renderer>().material.color = Color.white;
            }
        }
Пример #3
0
 public void Init(Point p)
 {
     point = p;
     transform.position = Point2Coord.point2coord(p, transform.position.y);
 }