WEEK9
Introduction
Goals
Working on the inventory system.
-spawn random items after a delay at a location when the enemy is destroyed (disappeared)
Scripts | functions |
RandomSpawner | spawn a random ball at point when it is enemy destroyed, otherwise do other spawn rules |
Timer | after a time it will destroy itself, also when player enter collision if it is a pickups game object, otherwise do something else |
InvisibleComponents | set visibility to target game object and change visibility when called |
Object Type | holding state reference to different object types |
EnemyAI | enemy behaviour switch/ readjust look directioon/ (spanw items/ set invisible/ destroy) when death |
The following is the primary author and any secondary authors who assisted in completing the tasks this week.
- Primary - Serena
- Secondary - Carter, Keal
Technologies, Tools, and Resources used
The following are the technologies, tools, and resources to assist in completing the set goals this week.
[Unity C# Random Object Instantiation]-
[Unity C# Creating and Deleting Objects]-
Key Tasks Undertaken
The following are the key tasks that were taken to help a developer/reader understand how the tasks were complete
- Redistribute the codes in Enemy AI to make sure every old function work appropriately
- have a concept about how to make the enemy spawn item and write down on the paper
- create some prefabs to set as spawners
- to make spawners are able to destroy itself,create a new script called Timer
- attach Timer to all the spawners prefabs
- Create a new script called RandomSpawner and attach to the enemy
- attach the new prefabs to the RandomSpawner script
- in enemy to add some codes in the fixed update to make enemy be able to spawn these spawners when destroyed
- Due to Timer script is holding destroy functions, need to rewrite the script to allow another script to access
- to distinguish the game object types difference, we need to create a new script called "GameObject Types"
- GameObjectTypes will allow other scripts to set types states to attached game objects
- In RandomSpawner, adding codes and bools to restrict activate triggers
- Same in Timer, execute different behaviors depends on different game object types when triggers activated
- retesting all the scripts in the games over and over again make sure no errors occur.
What I Found Out
Include any particular lessons learned, especially if this Spike was designed to cover knowledge gaps. Use Graphs, ScreenShots, Outcome Lists, or other Notes.
- to set one function only run once, need a local variable to control it
Solution Justification
- repeatedly testing games and use debug.log to check where the problem is and rewrite logic
- if you need to use the function codes from other scripts, need to attach the scripts
Open Issues/Risks
List the issues and risks that you have been unable to resolve at the end of the spike. You may have uncovered a whole range of new risks as well.
- if there are some new updates from other people, every time when I open the newest game file, some of my codes are missing or compile errors occur
Recommendations
- always make a copy of my script saved in my computer
SGD 300 FPS RPG
Status | Released |
Author | Serena.DD.Pei |
Genre | Shooter, Role Playing |
Tags | Unity |
Leave a comment
Log in with itch.io to leave a comment.