This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
So, like the title says: I'm trying to create a list of conditions whereupon something happens. For example, I have a bool somewhere else for if the player is close to an enemy. I'd like to be able to pass that bool into this list, serialized in such a way that I can check it against an expected condition. I have a generic function that would check a list of passed bools against their respective expected condition, but I am having trouble of thinking of a way to add a collection of conditions to the List.
The reason I'm trying to do it this way is that the conditions may change from case to case. So for example, one may evaluate to true if the player is close and is mid attack. Another may evaluate to true only if the player is not jumping. Even if there's only one condition to check, I need to be able to check it against an expected value, and I'd like to be able to grab an existing bool that knows the state of that condition, and I'd like to be able to keep this class generic so that I can easily modify different instances of the object to evaluate different sets of conditions.
Any thoughts on how to approach this?
Subreddit
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Unity3D/com...