public void Initial() { map = GlobalMap.GetMap(); mapSize = GlobalMap.GetMapSize(); mapIndex = 0; now_x = (int)hero.position.x; now_y = (int)hero.position.y - 2; now_z = (int)hero.position.z; dx = 0; dz = 5; while (groundQueue.Count > 0) { Destroy(groundQueue.Peek()); groundQueue.Dequeue(); } while (scoreQueue.Count > 0) { Destroy(scoreQueue.Peek()); scoreQueue.Dequeue(); } for (int i = 0; i < groundList.Count; ++i) { Destroy(groundList [i]); } groundList.Clear(); GlobalMap.SetWinFlag(0); }
public void Initial() { map = GlobalMap.GetMap(); mapSize = GlobalMap.GetMapSize(); mapIndex = 0; resurrectionIndex = 0; GlobalMap.ChangeDxy(map [mapIndex].dxDz, out dx, out dz); GlobalMap.SetWinFlag(0); transform.position = new Vector3(0, 0, 0); now_x = transform.position.x; //now_y = transform.position.y; now_z = transform.position.z; ground_index = 0; resurrectionPoint = new MyPoint((int)now_x, (int)now_z, 2.5, 2.5); ground[ground_index] = new MyPoint((int)now_x, (int)now_z, 2.5, 2.5); ground[1 - ground_index] = new MyPoint((int)now_x + dx, (int)now_z + dz, 2.5, 2.5); rotation_count = 0; isalive = 1; speed = spee_default; max_x = min_x = (int)now_x; max_z = min_z = (int)now_z; nowScore = 0; lastScore = 0; continueCount = 3; ui_gameSystem.ContinueTextUpdate(continueCount); transform.rotation = Quaternion.Euler(new Vector3(0, 0, 0)); }