This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
notes:cprog:spring2025:projects:mtb4 [2025/03/12 20:24] – [logic to implement] tstrickl | notes:cprog:spring2025:projects:mtb4 [2025/03/12 20:30] (current) – [power ups] tstrickl | ||
---|---|---|---|
Line 40: | Line 40: | ||
}; | }; | ||
- | instead of literally typing 1, you could just write MATT, and it would automatically be replaced by the value 1. | + | instead of literally typing 1, you could just write MATT, and it would represent |
- | Back to the context of powerups you could make an enum as such: | + | Back to the context of powerups, you could make an enum as such: |
enum POWERUPS | enum POWERUPS | ||
{ | { | ||
- | Duplicate | + | DUPLICATE |
- | MoarDamage | + | MOARDAMAGE |
- | Faster | + | FASTER |
}; | }; | ||
Line 56: | Line 56: | ||
{ | { | ||
Point position; | Point position; | ||
- | int type; | + | POWERUPS |
} | } | ||
- | then define | + | then create |
void main() | void main() | ||
{ | { | ||
- | | + | |
- | | + | |
| | ||
- | | + | |
} | } | ||
- | after providing values, | + | now everytime that you call ptrPowerup-> |