top of page

20th February

bullet level.png

The shooting mechanic of 'Dupliscape' has begun to be implemented. A turret sprite has been created along with a simple bullet sprite. This will be used to activate/deactivate platforms and eventually toggle a switch. 

This is the script used for the bullet. It sets the speed of the bullet when it is instantiated, which defaults moving right (a negative speed will be used to move it left). If the bullet collides with an object that is not the grid, it will deactivate that object by using a deactivate script that fades out the object. 

bullet script.png
shooting script.png

This is the script used for the shooting mechanic. It uses a fire rate to determine how often a bullet is created and a fire timer to determine how quickly is moves. 

This script is used to fade platforms out and in . It takes the game object and finds it Sprite Renderer. When the object needs to be faded out it uses the sprite renderer to dim it's colour. The collider of the object is also turned off, so a player or clone can no longer jump on in. 

 

The fade in functions returns the platform colour to it's original colour and turns the collider back on. This happens a set time after it has been faded out, which is determined by a fadeTimer variable. 

​

 

 

deactivate script.png
bottom of page