Esempio n. 1
0
 public void Init(int y, int x)
 {
     //初始化位置信息
     gameObject.transform.position = new Vector3(x * width + init_x
                                                 , init_y - y * height
                                                 , gameObject.transform.position.z);
     gameObject.transform.localScale = new Vector3(scale, scale, 1);
     crossTimes      = 0;
     allCrossTimes   = 0;
     renderer.sprite = Res.instance.cubeSpriteList[0];
     this.x          = x;
     this.y          = y;
     stepsList.Clear();
     gameObject.GetComponent <SpriteRenderer>().color = Color.white;
     touchHandler = new DefalutCubeTouchHandler();
     touchHandler.Init(this);
     showRequestNum(0);
 }
Esempio n. 2
0
 public void setTouchHandler(CubeTouchHandler handler)
 {
     touchHandler = handler;
     touchHandler.Init(this);
 }