i finally found a way to let the ghost disappear when it get hits. Also will a coin appear when the enemy is defeated. At first I tried a slightly different script attached to the bullet but that didn't worked that well because it wouldn't access the method.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjZuxqfU55MTU8ipR8mdkVaEUL8NcNgLaPhuK7R5f5JE_IvOkbNUoqwSj_XfK6E0k9shayzbM7ygdbEkk6jQnpWUvbQwjbY6JP-YUkx6jfzn-aWyiCWL58ZcxwAR2hC3LrCgIiZG9nv51k/s640/defeat.PNG)
In class I also added that the number of Coins will be set up with one when you collect a coin. At first it wouldn't update the Text of it but that was because the overwriting was in the Update method. When I changes it into the OnTrigger() it work just fine. Now I just have to add a better font to it and then the HUD is finished. Maybe I will change the Coin text into a image of the coin and will put it above the person HUD so it won't be a distraction for the player.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjtC8FeNRw7Jgo8hOkfRJnl99XPBZI12JwJhaG2Z5IYGaoBa5slImsTi4wnptnypkMOMy4a1nP-XHOg67-nY4kY4pph78FA5-N2Gm1x4StyYH_u7FdymZ6SausjihKbt4KrffKU4UDggMo/s640/Coins.PNG)
To let the character die when the ghost attacks him I needed a Game Over Screen. So I started to build on in another Scene. For the design I build a wall with the bookshelves and added a image of the open book that I created for my proposal.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEht358f3MQ7ZOgRw002A-VHsS-96eubtSdM7d6X0PqZ5BnCmqdaDuOBVMtY2h_T-KFSKWSk6QtyCE-Q867hnn9dHbS3ooZdNkhLuOfgrsz3L_tLU2cVljUBIuAFmy8r3xcYUI6T5qIUGMM/s640/GameOverScreen.PNG)
I decided to use the same screen for all the menus to have a bit of consistent. I added some light to the scene so that the shelves are a bit lit behind the book and so the book has a light halo. Still has to replace the buttons with something more fitting to the game but for now everything is working with that.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEguN7_zMyo1WYIR6JEd4bkDmqNfbiXzxiElW0daJW-5ZoVA2pbWwoPUK_0mpnFHEDW9RqS7AnpERD_2N-BtjH6WDJOiuVcV1Zo7JTY_XExW_9s9xCVD8U5xBg6TGAeIscDmdw-dGjGDnMU/s640/start.PNG)
In class I also added that the number of Coins will be set up with one when you collect a coin. At first it wouldn't update the Text of it but that was because the overwriting was in the Update method. When I changes it into the OnTrigger() it work just fine. Now I just have to add a better font to it and then the HUD is finished. Maybe I will change the Coin text into a image of the coin and will put it above the person HUD so it won't be a distraction for the player.
To let the character die when the ghost attacks him I needed a Game Over Screen. So I started to build on in another Scene. For the design I build a wall with the bookshelves and added a image of the open book that I created for my proposal.
I decided to use the same screen for all the menus to have a bit of consistent. I added some light to the scene so that the shelves are a bit lit behind the book and so the book has a light halo. Still has to replace the buttons with something more fitting to the game but for now everything is working with that.
Kommentare
Kommentar veröffentlichen