Skip to content

Conversation

@Soneshaps
Copy link
Owner

@Soneshaps Soneshaps commented Dec 8, 2022

Descriptions

  • Fix fruits logic to render out one fruit from each created instance
  • Random Fruits can be generated in each level having the same no of fruit

Reason for change

  • Previously fruits were rendered out by looping on the update method in the fruit class.
  • The code was too messy and hard to understand.
  • By doing these changes we can easily help create a fruit in Level Builder

@Soneshaps Soneshaps added the enhancement New feature or request label Dec 8, 2022
@Soneshaps Soneshaps self-assigned this Dec 8, 2022
@Soneshaps Soneshaps added the bug Something isn't working label Dec 8, 2022
Comment on lines +1 to +12
let f1 = new Fruit();
let f2 = new Fruit();
let f3 = new Fruit();
let f4 = new Fruit();
let f5 = new Fruit();
let f6 = new Fruit();
let f7 = new Fruit();
let f8 = new Fruit();
let f9 = new Fruit();
let f10 = new Fruit();
let f11 = new Fruit();
let f12 = new Fruit();
Copy link
Owner Author

Choose a reason for hiding this comment

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

Can we dynamically create fruits at each level?
We are adding a new class for each fruit to be rendered out

@Soneshaps Soneshaps changed the base branch from master to dev December 8, 2022 03:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants