advanceoop_project's Introduction
advanceoop_project's People
advanceoop_project's Issues
Facade Pattern
Set up scene - making the house to steal from
- Create a scene
- Either copy one of the houses from the imported suburbia packages or make your own
- Make it so the player cannot go anywhere else but the house/yard
Adapter Pattern
Spawn controller
Look at he spawncontroller script. In side there is a subclass stealable location pairs. In the scene, look at SpawnController object. You will see the script is attached and there is a public variable "Stealable Location Pairs".
Populate this with a stealable object prefab, and then a transform location and number the objective ID starting from 0. Under stealableObjectLocations you will see dummy objects like locations 1, 2, etc. You basically need to create and move this gameobjects to where the item should spawn. I have one example in there already
With the pairs, in the start method you will randomly select some number of them to spawn in by instantiating. Make a list of all the objectiveIDs of the stealables you spawn in so that it can be passed to the gamemanager
Lemme know if you have questions
Make a guard or something to catch player
Get a rigged character. You need to make a guard script or something to tell the rig to walk/do some animation.
Use a Behavior tree to make the AI. I have imported a script I made in the past called MoveTo. Use this custom action to make a series of random locations for the ai to go to. The guard needs to have a NavMeshAgenet component.
the guard needs to have a box collider that is a trigger. This trigger will tell the player to die (by calling a OnDeath in the Player Manager scipt.) You can use the TriggerEvent script from HFPS to easily call a method using unity events.
Lemme know if you have questions, this one is a bit bigger issue
Replace doors of main house with those from HFPS.
These are preanimated and have interaction set up already. Use door03 in prefabs folder
Singleton Pattern -Game Manager
- Import and use the code from the class to make a singleton
- Make a new class called game manager that uses singleton
The rest of the code is TBD. We will add to GM as we make more components
Flyweight
Decorator Pattern
Simple Factory Pattern
Set up player controller, make prefab of it
Jeremy will do this
Logic to reload the scene on death - probably in the game manager
The FPSPLAYER should have a way to tell Game Manager to restart. Game manager will actually restart the scene.
The script "Player controller" is already used by HFPS, so to avoid confusion, we will use the scrip PlayerManager. This script is already attached to the FPSPlayer and can be found in the scripts folder. There is a OnDeath() method to be populated.
State Pattern
Strategy Pattern
An exit that check for if objects are done, if so win, else do nothing
Probably a ontrigger something and use a box collider and make sure that isTrigger is set to true. You can use the "Trigger Event" script from HFPS on this trigger to call the method described below easier.
In the playerManager script, call a method like "OnWinCheck" that handles this. This "OnWinCheck" will probably then call gamemanager to handle checking objectives to see if the player actually won
Command Pattern
Create Stealable objects
- Create a folder in prefab folder for all the stealable
- The objects need to be in the layer to interact
- The objects need the script interactive item on them.
MVC
Populate objectives with stealable items
Visitor Pattern
Observer Pattern
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.