From 5709b2f78e687359ab54ec66567525d31b3b7235 Mon Sep 17 00:00:00 2001 From: DorianLarouziere Date: Mon, 14 Nov 2022 01:16:01 +0100 Subject: [PATCH] clean --- Assets/Scripts/Building/Farm.cs | 10 ---------- Assets/Scripts/Building/Farm.cs.meta | 11 ----------- Assets/Scripts/Building/LumberCamp.cs | 18 ------------------ Assets/Scripts/Building/LumberCamp.cs.meta | 11 ----------- Assets/Scripts/Building/Mine.cs | 18 ------------------ Assets/Scripts/Building/Mine.cs.meta | 11 ----------- Assets/Scripts/Building/TownCenter.cs | 18 ------------------ Assets/Scripts/Building/TownCenter.cs.meta | 11 ----------- Assets/Scripts/Menus/GameMenuController.cs | 15 --------------- Assets/Scripts/MiniGame/bulletController.cs | 17 ----------------- Assets/Scripts/Terrain/Hex.cs | 11 ----------- Assets/Scripts/Terrain/HexMap_Continent.cs | 15 ++------------- 12 files changed, 2 insertions(+), 164 deletions(-) delete mode 100644 Assets/Scripts/Building/Farm.cs delete mode 100644 Assets/Scripts/Building/Farm.cs.meta delete mode 100644 Assets/Scripts/Building/LumberCamp.cs delete mode 100644 Assets/Scripts/Building/LumberCamp.cs.meta delete mode 100644 Assets/Scripts/Building/Mine.cs delete mode 100644 Assets/Scripts/Building/Mine.cs.meta delete mode 100644 Assets/Scripts/Building/TownCenter.cs delete mode 100644 Assets/Scripts/Building/TownCenter.cs.meta diff --git a/Assets/Scripts/Building/Farm.cs b/Assets/Scripts/Building/Farm.cs deleted file mode 100644 index ce8b04d..0000000 --- a/Assets/Scripts/Building/Farm.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using Unity.VisualScripting; -using UnityEngine; - -public class Farm -{ - [SerializeField] GameObject farmGO; - -} diff --git a/Assets/Scripts/Building/Farm.cs.meta b/Assets/Scripts/Building/Farm.cs.meta deleted file mode 100644 index 45f0905..0000000 --- a/Assets/Scripts/Building/Farm.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 1f56a9a9c348ec445bf0cfd7471caebd -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Building/LumberCamp.cs b/Assets/Scripts/Building/LumberCamp.cs deleted file mode 100644 index 6fa3ad8..0000000 --- a/Assets/Scripts/Building/LumberCamp.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class LumberCamp : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/Assets/Scripts/Building/LumberCamp.cs.meta b/Assets/Scripts/Building/LumberCamp.cs.meta deleted file mode 100644 index 6d91c1a..0000000 --- a/Assets/Scripts/Building/LumberCamp.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 56dc56848f687924e85b77959dd0559d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Building/Mine.cs b/Assets/Scripts/Building/Mine.cs deleted file mode 100644 index 1f13bea..0000000 --- a/Assets/Scripts/Building/Mine.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class Mine : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/Assets/Scripts/Building/Mine.cs.meta b/Assets/Scripts/Building/Mine.cs.meta deleted file mode 100644 index 11f06a2..0000000 --- a/Assets/Scripts/Building/Mine.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 5080fe267d9368a44bd41ef648c0600c -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Building/TownCenter.cs b/Assets/Scripts/Building/TownCenter.cs deleted file mode 100644 index cc2990b..0000000 --- a/Assets/Scripts/Building/TownCenter.cs +++ /dev/null @@ -1,18 +0,0 @@ -using System.Collections; -using System.Collections.Generic; -using UnityEngine; - -public class TownCenter : MonoBehaviour -{ - // Start is called before the first frame update - void Start() - { - - } - - // Update is called once per frame - void Update() - { - - } -} diff --git a/Assets/Scripts/Building/TownCenter.cs.meta b/Assets/Scripts/Building/TownCenter.cs.meta deleted file mode 100644 index 396a3ba..0000000 --- a/Assets/Scripts/Building/TownCenter.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: cce2a7e7312e0e148829c5a7d17e2b0d -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Assets/Scripts/Menus/GameMenuController.cs b/Assets/Scripts/Menus/GameMenuController.cs index bd82aa8..3e9edfc 100644 --- a/Assets/Scripts/Menus/GameMenuController.cs +++ b/Assets/Scripts/Menus/GameMenuController.cs @@ -6,7 +6,6 @@ public class GameMenuController : MonoBehaviour [SerializeField] private GameObject infoPanel; [SerializeField] private GameObject resourcesLayout; [SerializeField] private GameObject defaultBottomBar; - // [SerializeField] private GameObject actionMenuOnEmptySpace; [SerializeField] private GameObject actionMenuOnBuildSpace; [SerializeField] private GameObject actionMenuOnCityCenter; [SerializeField] private GameObject buildMenu; @@ -49,7 +48,6 @@ public void GetDefaultMenu() infoPanel.SetActive(false); defaultBottomBar.SetActive(true); actionMenuOnBuildSpace.SetActive(false); - // actionMenuOnEmptySpace.SetActive(false); actionMenuOnCityCenter.SetActive(false); buildMenu.SetActive(false); } @@ -71,7 +69,6 @@ public void GetBuildMenu(bool[] buildingAvailable) infoPanel.SetActive(false); defaultBottomBar.SetActive(false); actionMenuOnBuildSpace.SetActive(false); - // actionMenuOnEmptySpace.SetActive(false); actionMenuOnCityCenter.SetActive(false); buildMenu.GetComponent().GetBuildOptions(buildingAvailable); } @@ -86,22 +83,11 @@ public void GetInfoPanel(Building build) infoPanel.GetComponent().GetInfo(build); } - - // private void GetActionMenuOnEmptySpace() - // { - // defaultBottomBar.SetActive(false); - // actionMenuOnBuildSpace.SetActive(false); - // actionMenuOnEmptySpace.SetActive(true); - // actionMenuOnCityCenter.SetActive(false); - // buildMenu.SetActive(false); - // } - private void GetInfoOnBuildSpace(Building build) { GetInfoPanel(build); defaultBottomBar.SetActive(false); actionMenuOnBuildSpace.SetActive(true); - // actionMenuOnEmptySpace.SetActive(false); actionMenuOnCityCenter.SetActive(false); buildMenu.SetActive(false); } @@ -111,7 +97,6 @@ private void GetActionMenuOnCityCenter(Building build) GetInfoPanel(build); defaultBottomBar.SetActive(false); actionMenuOnBuildSpace.SetActive(false); - // actionMenuOnEmptySpace.SetActive(false); actionMenuOnCityCenter.GetComponent().GetCreationOptions(build); buildMenu.SetActive(false); } diff --git a/Assets/Scripts/MiniGame/bulletController.cs b/Assets/Scripts/MiniGame/bulletController.cs index b5e99bd..a6595fe 100644 --- a/Assets/Scripts/MiniGame/bulletController.cs +++ b/Assets/Scripts/MiniGame/bulletController.cs @@ -12,22 +12,5 @@ public class bulletController : MonoBehaviour Destroy(this.gameObject); } - if(collision.gameObject.layer == LayerMask.NameToLayer("Enemy")) - { - //TODO : Enemy lose xPV - - Debug.Log("Ennemie touché"); - } - - /*if (collision.gameObject.layer == LayerMask.NameToLayer("Target")) - { - Destroy(collision.gameObject); - Destroy(this.gameObject); - }*/ } - - /* private void OnCollisionExit(Collision collision) - { - Debug.Log("Collision Exit!"); - }*/ } diff --git a/Assets/Scripts/Terrain/Hex.cs b/Assets/Scripts/Terrain/Hex.cs index c9aeb85..ceffdb8 100644 --- a/Assets/Scripts/Terrain/Hex.cs +++ b/Assets/Scripts/Terrain/Hex.cs @@ -53,8 +53,6 @@ public Vector3 Position() 0, HexVerticalSpacing() * this.R ); - - //return new Vector3(HexHorizontalSpacing() * (this.Q + this.R/2f), 0, HexVerticalSpacing() * this.R); } public Vector3 PositionFromCamera() @@ -77,10 +75,6 @@ public Vector3 PositionFromCamera(Vector3 cameraPosition, float numberRows, floa float howManyWidthsFromCamera = (position.x - cameraPosition.x) / mapWidth; //We want howManyWidthsFromCamera to be between -0.5 to 0.5 - /*if(Mathf.Abs(howManyWidthsFromCamera) <= 0.5f) - { - return position; - }*/ if (howManyWidthsFromCamera > 0) { @@ -100,10 +94,6 @@ public Vector3 PositionFromCamera(Vector3 cameraPosition, float numberRows, floa float howManyWidthsFromCamera = (position.z - cameraPosition.z) / mapHeight; //We want howManyWidthsFromCamera to be between -0.5 to 0.5 - /*if(Mathf.Abs(howManyWidthsFromCamera) <= 0.5f) - { - return position; - }*/ if (howManyWidthsFromCamera > 0) { @@ -190,7 +180,6 @@ public Unit[] getUnits() public int BaseMovementCost() { - //TODO : Factor in terrain type & features return 1; } diff --git a/Assets/Scripts/Terrain/HexMap_Continent.cs b/Assets/Scripts/Terrain/HexMap_Continent.cs index b59e5cd..811bb79 100644 --- a/Assets/Scripts/Terrain/HexMap_Continent.cs +++ b/Assets/Scripts/Terrain/HexMap_Continent.cs @@ -28,11 +28,7 @@ public override void GenerateMap() } } - //elevateArea(21, 15, 6); - //elevateArea(16, 21, 6); - //elevateArea(24, 5, 6); - - //Add lumpiness Perlin NOise? + //Add lumpiness Perlin NOise float noiseResolution = 0.01f; Vector2 noiseOffset = new Vector2(Random.Range(0f,1f), Random.Range(0f, 1f)); float noiseScale = 1.5f; @@ -49,9 +45,8 @@ public override void GenerateMap() } - //Set mesh to mounter/hill/flat/water based on height - //Simulate rainfall/moisture (probably just Perlin it for now) and set plain/granssslands + forest + //Simulate rainfall/moisture and set plain/granssslands + forest noiseResolution = 0.05f; noiseOffset = new Vector2(Random.Range(0f, 1f), Random.Range(0f, 1f)); @@ -84,15 +79,9 @@ private void elevateArea(int q, int r, int range, float centerHeight = 0.8f) { Hex centerHex = getHexeAt(q, r); - //centerHex.Elevation = 0.5f; - Hex[] areaHexes = getHexesWithinRangeOf(centerHex, range); foreach(Hex h in areaHexes) { - /*if(h.Elevation < 0) - { - h.Elevation = 0; - }*/ h.Elevation = centerHeight * Mathf.Lerp(1f, 0.25f, Mathf.Pow(Hex.Distance(centerHex, h)/range,2f)); } }