Added messages indicating player lost/ gained oxygen. Fixed bug where…#8
Added messages indicating player lost/ gained oxygen. Fixed bug where…#8philliplagoc wants to merge 1 commit into
Conversation
… using projectile on food destroyed food
| private void OnTriggerEnter2D(Collider2D collision) | ||
| { | ||
| if (collision.gameObject.GetComponent<Interactive>() != null) | ||
| if (collision.gameObject.GetComponent<Interactive>() != null && collision.gameObject.tag == "Player") |
There was a problem hiding this comment.
This change will prevent food from interacting with other types of collisions ( consider if we want to write a hook that can hook food for us in the future ). I think the food being destroyed by projectiles can be considered either as a feature, or if you don't like it, a bug. You can try to "fix" it in some other way if you don't like it, otherwise just consider it as a feature because it also adds a risk to firing a projectile.
lhwlyd
left a comment
There was a problem hiding this comment.
See the comments in the codes. Also, try to get rid of all unnecessary files' staging such as *.dwlt, *.json, *.stamp etc if you didn't change them (some of them are just there to mark the current time/system ). Git add only the files you want to change.
Send a pull request again when you've made the changes!
… using projectile on food destroyed food