This pull request aims to resolve the following issue:
2
This MVP of the Crow covers spawning, movement and hit detection. There are currently the following features:
A custom crow prefab CrowEnemy scaled appropriately to the player (3x the width of the player)
A rough 'Alert' prefab to tell the player the Crow has spawned/is moving
A CrowManager script to handle respawn delay and crow movement over time across the scene
A basic implementation of a collision check between the crow's shadow and the player
For review in PR:
Currently working in a test scene called CrowTesting
Prefabs -> Crow -> CrowEnemy
Prefabs -> Alert -> Everything in folder
Scripts -> Crow -> CrowCollision
Scripts -> Crow -> CrowManager
How it works:
When the scene starts, a crow prefab is instantiated offscreen at a set x-position ahead of the player and a random z-position (bound to the playable area). The crow then moves over a set amount of time (current 5sec) towards an end x-position before hiding offscreen again, waiting a random amount, then respawning at a new z-position.
Implementing in the main scene:
As discussed, after merging this feature another branch/PR will integrate this correctly with the main scene assets and structure.
The CrowManager needs to be added and linked to the CrowEnemy prefab, with the alert being attached to the player and also linked in CrowManager.
The player gameobject will need collision to accurately check if they have hit the crows shadow
Any fixes to X or Z-axis positions if required
Future tasks required:
As we have not set up the player health/items yet, there isnt much to show the player has collided with the crow so it is only shown as a Debug.Log() at this stage.
The design team have also mentioned they would like the possiblity of adding more crows as the game goes on. This could easily be implemented by calling SpawnCrow() again after the first crow has passed the player a set number of times. (If crow has 'moved' 5 times, spawn a second crow, repeat up to a max of 3 crows.)
Other potential issues:
The alert may not always show correctly if the Crow travelTime is a low value (e.g 1). As the alert is likely to change from this initial prototype I have not worried in addressing this issue at this stage but in the future we could have a shorter animation that plays/loops.
Crow Enemy
Description
This pull request aims to resolve the following issue:
2
This MVP of the Crow covers spawning, movement and hit detection. There are currently the following features:
CrowEnemy
scaled appropriately to the player (3x the width of the player)For review in PR: Currently working in a test scene called
CrowTesting
How it works:
When the scene starts, a crow prefab is instantiated offscreen at a set x-position ahead of the player and a random z-position (bound to the playable area). The crow then moves over a set amount of time (current 5sec) towards an end x-position before hiding offscreen again, waiting a random amount, then respawning at a new z-position.
Implementing in the main scene:
As discussed, after merging this feature another branch/PR will integrate this correctly with the main scene assets and structure.
Future tasks required:
As we have not set up the player health/items yet, there isnt much to show the player has collided with the crow so it is only shown as a Debug.Log() at this stage. The design team have also mentioned they would like the possiblity of adding more crows as the game goes on. This could easily be implemented by calling SpawnCrow() again after the first crow has passed the player a set number of times. (If crow has 'moved' 5 times, spawn a second crow, repeat up to a max of 3 crows.)
Other potential issues:
The alert may not always show correctly if the Crow travelTime is a low value (e.g 1). As the alert is likely to change from this initial prototype I have not worried in addressing this issue at this stage but in the future we could have a shorter animation that plays/loops.