# 宝石塔防 **Repository Path**: tzweilai/gem_td ## Basic Information - **Project Name**: 宝石塔防 - **Description**: 对宝石TD魔兽图的仿制,欢迎试玩。主要玩法是玩家构造迷宫,限制敌人的行走路线,并击败它们。可以在发行版处获取最新版本哦~ - **Primary Language**: C# - **License**: Unlicense - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 4 - **Created**: 2024-08-09 - **Last Updated**: 2024-08-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Gem Tower Defense #### Introduction A mini game made in memory of the World of Warcraft map that year, players can build a maze by building defensive towers by themselves, defeating more enemies and winning. Due to limited technology, there is not much content in the current version. Most of the resources in the game are self-made, and there will be opportunities to add content in the future. If you are also interested in tower defense, you might as well contact me to communicate. My email is tydhhzc@163.com. #### Gameplay WS moves the lens back and forth, press and drag the right mouse button to adjust the angle of view. Click the operation panel in the lower right corner to start building and start the next wave. Click on the base to refresh the operation panel and upgrade to the corresponding gem. Get one point every time you start a wave, see how long you can last! ## 2020-9-12 Refactoring the project 1. Rewrite the bottom part and re-divide the functions as: 1. **GameC class**, which controls the start and close of the game, script initialization sequence, etc. 2. **GameDataC class**, which controls the content of the game. You can write some special effects here. 3. **InputC class**, input manager, where input is unified, and related content on the mobile terminal needs to be added. 4. **AssetManager class**, based on AssetBundle to realize the loading and unloading of management game resources. 5. **Timer**, the central timer, can register events to this type of singleton to achieve the delay effect. 2. Rewrite the implementation of game content: 1. **UnitBase class**, saves the information of operability entities, and realizes the forwarding of events such as injuries. 2. **Enemy class**, the enemy entity must have an instance of this class to implement event logic such as movement, injury, and death. 3. **Tower class**, the logic class of the tower, which can execute corresponding attack logic, find enemies, launch projectiles, etc. 4. **Projectile class**, the logic class of the projectile, which handles the movement, collision, and special effects of the projectile. 5. **SphereScript class**, the logic class of the collision body, processing collision information, realizing range, AOE damage, etc. 3. Rewrite the data configuration method, no need to modify the **Projectile class** and **Tower class**: 1. **TowerConfig class**, contains the resources and logic configuration required by the **Tower class**, and describes the purpose. 2. **ProjectileConfig class**, contains resources and logic configuration required by **Projectile class**. 4. Updated the content of the manager: 1. **BuilderManager class**: Added the realization function from the base to the gem tower. 2. **EnemyManager class**: 1. Rewrite the method of spawning soldiers, and put the data initialization in **Enemy**. 2. The statistical method has been modified, and now the next wave of enemies can be released immediately after a wave of enemies has been released. 3. **UIMgr class**, which implements the main interface function logic. Currently, two sets of panel UI are implemented, and the solution needs to be improved. 5. Added new game resources: 1. Eight prefabs of gem towers (red, green, yellow, blue, purple, black and white powder). 2. Some materials realized by self-made ShaderGraph. 3. The sound effect of the portal when the enemy arrives. 4. Some imported materials. ![avatar](/Garnet.jpg) ### Missile well effect ![avatar](/Jade.jpg) ### Multiple attack effects ![avatar](/Amber.jpg) ### Lightning effect ![avatar](/screenshot.jpg) ### Game screenshot ## 2020-8-7 Create the project warehouse Made a simple gem tower defense with a low degree of completion. 1. Use NavMesh to complete the enemy's path finding function. 2. Completed the main logic part of the game, including the animation from the beginning to the end of the game. ![avatar](/gemtd.jpg)