Gamebridge/Ghost Tutorial
Jump to navigation
Jump to search
Create a simple scene with a flashlight and ghosts[edit]
These steps aren't complete, but will be detailed more precisely later. You can get help with all the missing steps by coming to the class.
- Create a new project
- drop a First Person Controller into it, set its transform to 0,0,0
- Create a cube under it, resize it to 10,10,1
- Make a sphere, rename it Ghost
- Set its collider to IsTrigger = true
- Make a javascript, rename it GhostKillsYou
- Edit GhostKillsYou
- Make it handle a collision with:
function onTriggerEnter ( collider : Collider) { Application.LoadLevel(0); // this resets the game to level id 0 }
- Make a Cube called GhostSummoner
- Make a script for it that uses Instantiate() to spawn more ghosts
- Make a var GhostPrefabToSpawn : Transform;