Esempio n. 1
0
 private void CreateMap(int x, int z)
 {
     if (generateMaps)
     {
         mapGenerator.GenerateMap(x, z, wrapping);
     }
     else
     {
         hexGrid.CreateMap(x, z, wrapping);
     }
     HexMapCamera.ValidatePosition();
     Close();
 }
Esempio n. 2
0
 void Load(string path)
 {
     if (!File.Exists(path))
     {
         Debug.LogError("File does not exist " + path);
         return;
     }
     using (BinaryReader reader = new BinaryReader(File.OpenRead(path))) {
         int header = reader.ReadInt32();
         if (header <= 1)
         {
             hexGrid.Load(reader, header);
             HexMapCamera.ValidatePosition();
         }
         else
         {
             Debug.LogWarning("Unknown map format " + header);
         }
     }
 }
Esempio n. 3
0
 private void Awake()
 {
     instance = this;
     swivel   = transform.GetChild(0);
     stick    = swivel.GetChild(0);
 }
Esempio n. 4
0
 void CreateMap(int x, int z)
 {
     hexGrid.CreateMap(x, z);
     HexMapCamera.ValidatePosition();
     Close();
 }