Beispiel #1
0
 //炸彈座標初始化
 void BoomPosInit()
 {
     //設定炸彈道具
     for (int ID = 0; ID < _mapData.getBombPos().Count; ID++)
     {
         //創造炸彈道具座標點
         Point    PBlock = new Point(_mapData.getBombPos(ID).x, _mapData.getBombPos(ID).y);
         Point [] PT     = PosToBlock((int)PBlock.x, (int)PBlock.y);
         //設定炸彈道具位置
         _bomb[ID].transform.localPosition = new Vector3((float)-0.5 + ((float)(PT[0].x + PT[1].x) / 2 / _mapWidth), (float)0.5 - ((float)(PT[0].y + PT[1].y) / 2 / _mapHeight), -1);
     }
 }