Skip to content

Added messages indicating player lost/ gained oxygen. Fixed bug where…#8

Open
philliplagoc wants to merge 1 commit into
masterfrom
phillipBranch
Open

Added messages indicating player lost/ gained oxygen. Fixed bug where…#8
philliplagoc wants to merge 1 commit into
masterfrom
phillipBranch

Conversation

@philliplagoc
Copy link
Copy Markdown
Collaborator

… using projectile on food destroyed food

@philliplagoc philliplagoc requested a review from lhwlyd November 18, 2017 22:04
private void OnTriggerEnter2D(Collider2D collision)
{
if (collision.gameObject.GetComponent<Interactive>() != null)
if (collision.gameObject.GetComponent<Interactive>() != null && collision.gameObject.tag == "Player")
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Owner

@lhwlyd lhwlyd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants