Begining of work on Hex script
This commit is contained in:
BIN
Assets/Scenes/Game.unity
LFS
BIN
Assets/Scenes/Game.unity
LFS
Binary file not shown.
8
Assets/scripts/hex.meta
Normal file
8
Assets/scripts/hex.meta
Normal file
@@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8da86797540d11543a330b02c1768147
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
28
Assets/scripts/hex/Hex.cs
Normal file
28
Assets/scripts/hex/Hex.cs
Normal 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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f818c27fab882aa4ea5ad1e4f175462f
|
||||
guid: 39fcf992f203d70498433370e055f6ee
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user