From ead50546eef9869f12c879aee5fb1807b9b16203 Mon Sep 17 00:00:00 2001 From: ean205 Date: Tue, 13 Jan 2026 20:06:41 +0300 Subject: [PATCH] Begining of work on Hex script --- Assets/Scenes/Game.unity | 4 +-- Assets/scripts/hex.meta | 8 ++++++ Assets/scripts/hex/Hex.cs | 28 +++++++++++++++++++ .../{hexCulling.cs.meta => hex/Hex.cs.meta} | 2 +- Assets/scripts/hexCulling.cs | 21 -------------- 5 files changed, 39 insertions(+), 24 deletions(-) create mode 100644 Assets/scripts/hex.meta create mode 100644 Assets/scripts/hex/Hex.cs rename Assets/scripts/{hexCulling.cs.meta => hex/Hex.cs.meta} (83%) delete mode 100644 Assets/scripts/hexCulling.cs diff --git a/Assets/Scenes/Game.unity b/Assets/Scenes/Game.unity index 02ac1b2..0555414 100644 --- a/Assets/Scenes/Game.unity +++ b/Assets/Scenes/Game.unity @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a3b69bf78de87d086f80a45ccdcf4ad0d60bf88b406b8a23275ad788712edc7a -size 248212 +oid sha256:a1dcbfb04709dfd37aefc14d20d3b4403915452d042fd97b4d010bc3f9fcb7d7 +size 245104 diff --git a/Assets/scripts/hex.meta b/Assets/scripts/hex.meta new file mode 100644 index 0000000..c94b3aa --- /dev/null +++ b/Assets/scripts/hex.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 8da86797540d11543a330b02c1768147 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Assets/scripts/hex/Hex.cs b/Assets/scripts/hex/Hex.cs new file mode 100644 index 0000000..2c356d6 --- /dev/null +++ b/Assets/scripts/hex/Hex.cs @@ -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() + { + + } +} diff --git a/Assets/scripts/hexCulling.cs.meta b/Assets/scripts/hex/Hex.cs.meta similarity index 83% rename from Assets/scripts/hexCulling.cs.meta rename to Assets/scripts/hex/Hex.cs.meta index 2deb8fb..39908cf 100644 --- a/Assets/scripts/hexCulling.cs.meta +++ b/Assets/scripts/hex/Hex.cs.meta @@ -1,5 +1,5 @@ fileFormatVersion: 2 -guid: f818c27fab882aa4ea5ad1e4f175462f +guid: 39fcf992f203d70498433370e055f6ee MonoImporter: externalObjects: {} serializedVersion: 2 diff --git a/Assets/scripts/hexCulling.cs b/Assets/scripts/hexCulling.cs deleted file mode 100644 index 5e93249..0000000 --- a/Assets/scripts/hexCulling.cs +++ /dev/null @@ -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); - } -}