Begining of work on Hex script

This commit is contained in:
ean205
2026-01-13 20:06:41 +03:00
parent 422de453af
commit ead50546ee
5 changed files with 39 additions and 24 deletions

Binary file not shown.

8
Assets/scripts/hex.meta Normal file
View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 8da86797540d11543a330b02c1768147
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

28
Assets/scripts/hex/Hex.cs Normal file
View File

@@ -0,0 +1,28 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Hex : MonoBehaviour
{
public enum landscapeTypes { water, land, hill, highHill, mountain, uncrosableMountain };
public Vector2Int position;
public float noiseValue;
public landscapeTypes landType;
public int miniMapSeed;
public int income; //Ìîäèôèêàòîð ê äîõîäó â åäåíèöó âðåìåíè îò ýòîãî ãåêñà
//TODO ïåðåìåííàÿ äëÿ ïàìàòè ñîäåðæèìîãî
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: f818c27fab882aa4ea5ad1e4f175462f
guid: 39fcf992f203d70498433370e055f6ee
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,21 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class hexCulling : MonoBehaviour
{
public Camera camera;
public float baseX;
public float baseY;
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
transform.localScale = new Vector3(-1 * baseX * (10+camera.transform.position.z), -1 * baseX * (10+camera.transform.position.z), 3);
}
}