Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup after last merge #75

Merged
merged 14 commits into from
Feb 24, 2022
Merged

Cleanup after last merge #75

merged 14 commits into from
Feb 24, 2022

Conversation

ddabble
Copy link
Member

@ddabble ddabble commented Feb 18, 2022

See each commit message for details.

These were accidentally deleted in the 8d3cac1 merge commit.
* Made the `Terrain` gameobject in `Endless Mode.unity` into a prefab named `HexGrid.prefab`
* [BaseController] Changed the type of `gameManager` from `GameObject` to `EndlessMode`
* [EndlessMode]
  * Renamed `enemies` -> `enemyPrefabs`, `a` -> `linearSpawnRate` and `k` - > `exponentialSpawnRate`
* [HexCell] Fixed some faulty merging (in b824f56):
  * Re-removed the unused `Position` property
  * Re-renamed the serialized `mr` field to `meshRenderer`
* [HexGrid]
  * Renamed `towers` -> `towerPrefabs`
  * Removed the `SerializeField` attribute from `playerBase`, as it's always set in `Awake()` anyway
* [RepairAnimationController] Renamed the VFX prefab fields (like `fxLow` -> `lowWearVFXPrefab`)
* [RepairController]
  * Renamed `damageInterval` -> `wearInterval` and `timeStamp` -> `lastWearStateChangeTime`
  * Removed the unused `needRepair` field
...instead of three separate arrays (loosely) connected by their shared indices (namely `elevation`, `occupier` and `occupierRotation`
in `TerrainData`).
The logic for setting cell elevation now no longer relies on the naively arbitrary indices of the `HexGrid.cellMaterials` list.
It's instead replaced with logic based on an array - `HexGrid.cellTypes` - containing the material and the associated elevation for each type of cell.

Also, moved some of the logic in the previous `HexGrid.ElevateCell()` to the setter of `HexCell.CellType`.
Also improved the code for saving and loading the highscore data, by using `using` statements instead of closing the streams manually.
Copy link
Collaborator

@Fueredoriku Fueredoriku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked through code, tested and it works on my end. Great job! 🎉

@ddabble ddabble merged commit 883ebad into develop Feb 24, 2022
@ddabble ddabble deleted the fix/cleanup-after-merge branch February 24, 2022 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants