Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
DorianLarouziere committed Nov 14, 2022
1 parent 82ddb3a commit 5709b2f
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 164 deletions.
10 changes: 0 additions & 10 deletions Assets/Scripts/Building/Farm.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Scripts/Building/Farm.cs.meta

This file was deleted.

18 changes: 0 additions & 18 deletions Assets/Scripts/Building/LumberCamp.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Scripts/Building/LumberCamp.cs.meta

This file was deleted.

18 changes: 0 additions & 18 deletions Assets/Scripts/Building/Mine.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Scripts/Building/Mine.cs.meta

This file was deleted.

18 changes: 0 additions & 18 deletions Assets/Scripts/Building/TownCenter.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/Scripts/Building/TownCenter.cs.meta

This file was deleted.

15 changes: 0 additions & 15 deletions Assets/Scripts/Menus/GameMenuController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
}
Expand All @@ -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<BuildMenuController>().GetBuildOptions(buildingAvailable);
}
Expand All @@ -86,22 +83,11 @@ public void GetInfoPanel(Building build)
infoPanel.GetComponent<InfoPanelController>().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);
}
Expand All @@ -111,7 +97,6 @@ private void GetActionMenuOnCityCenter(Building build)
GetInfoPanel(build);
defaultBottomBar.SetActive(false);
actionMenuOnBuildSpace.SetActive(false);
// actionMenuOnEmptySpace.SetActive(false);
actionMenuOnCityCenter.GetComponent<MenuOnCityCenterController>().GetCreationOptions(build);
buildMenu.SetActive(false);
}
Expand Down
17 changes: 0 additions & 17 deletions Assets/Scripts/MiniGame/bulletController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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!");
}*/
}
11 changes: 0 additions & 11 deletions Assets/Scripts/Terrain/Hex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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)
{
Expand All @@ -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)
{
Expand Down Expand Up @@ -190,7 +180,6 @@ public Unit[] getUnits()

public int BaseMovementCost()
{
//TODO : Factor in terrain type & features
return 1;
}

Expand Down
15 changes: 2 additions & 13 deletions Assets/Scripts/Terrain/HexMap_Continent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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));
Expand Down Expand Up @@ -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));
}
}
Expand Down

0 comments on commit 5709b2f

Please sign in to comment.