Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

call members' kill/revive when called on sprite groups #2423

Merged
merged 6 commits into from Jan 25, 2022

Conversation

Geokureli
Copy link
Member

@Geokureli Geokureli commented Oct 5, 2021

fixes #2306
FlxGroups weren't calling kill() and revive on it's members, but it appeared as though it was, because it was setting alive and exists on each of them individually.

I also changed reset(). Before it would move everything over uniformly, and then reset every sprite to the same x,y. Now it resets everything to a new uniformly moved position.

@Geokureli Geokureli merged commit d2f6fc0 into HaxeFlixel:dev Jan 25, 2022
@Geokureli Geokureli deleted the spritegroup_revive branch January 25, 2022 05:14
Geokureli added a commit that referenced this pull request Jan 26, 2022
* Enable workflow_dispatch

* Fixing little error for android build (#2407)

* Explain FlxG singletons in input util docs (#2411)

* Mention color in docs for FlxBitmapFont.fromMonospace (#2412)

This makes it a little more clear that if you're loading a FlxBitmapFont from a monospace font file that you wish to change the color of, ensure the pixels are white. This allows the textColor property to work as expected. If the pixels happen to be black, the textColor changes won't be visible.

* redraw sprite before `updateHitbox()`. fixes #2413 (#2417)

* Remove references to FlxObject direction flag constants (#2424)

* fix: image showcase link (#2438)

* Fixed spelling in comment in FlxBasePreloader (#2447)

* Update documentation on scale modes. (#2455)

* Update license link (#2464)

* remove redundant modifier (#2467)

* Fix CI

* Add FlxAnimationController.getNamesList() to get the current list of animation names (#2473)

* Add the list thing

* Oops, beta description

* Kinda a fix?

* Experimental stuff with setting new names lol

* Adds a more safe option in case you don't complete the entire thing

* remove the variable and add the functions

* change some minor stuff

* remove the last _list things

* Update FlxAnimationController.hx

* Idk if it works but maybe the checks are failing cos of that?

* Add a nicer code and description stuff

* add tests, and small corrections

* Add the rename test on FlxAnimationControllertest

Co-authored-by: George FunBook <gkurelic@gmail.com>

* fix typo in unit tests

* Add getRotatedRectBounds helpers (#2298)

* `FlxRect.getRotatedBounds`
* `FlxObject.getRotatedBounds`
* `FlxSprite.getRotatedBounds` - override
* `FlxSprite.getScreenBounds` - similar to `FlxSprite.getScreenPosition`
* `FlxSpriteUtil.cameraWrap` - similar to `FlxSpriteUtil.screenWrap` but uses FlxDirectionFlags instead of 4 booleans
* `FlxSpriteUtil.cameraBounds` - similar to `FlxSpriteUtil.cameraWrap`
* `FlxCamera.getViewRect` - helper for `FlxSpriteUtil.cameraWrap` and `cameraBound`
* `FlxCamera.containsRect`- helper for `FlxSpriteUtil.cameraWrap` and `cameraBound`
* `FlxCollision.pixelPerfectCheck` - uses getScreenBounds to reduce the number of pixel checks, honors FlxSprite's scale
* `FlxSprite.isOnScreen` - uses getScreenBounds for more accuracy
* `FlxCamera.containsPoint` - calls putWeak

* ignore failing test for now

* sceenCenter Readibility (#2441)

* add screenCenter test

* improve readability of screenCenter

* add check with no parameters

* inline screenCenter

* update FlxState comment on constructor

* Prevent hashlink segfaults on linux (#2487)

* change integers used for ANY and NONE FlxKey <REVERTED>

* add FlxKey tests for ANY/NONE

* remove switch causing seg faults

Co-authored-by: jf <j@b.f>
Co-authored-by: George FunBook <gkurelic@gmail.com>

* call members' kill/revive when called on sprite groups (#2423)

* call members' kill/revive when called on sprite groups

* make sure kill/revive is NOT called when not needed

* fix spriteGroup.reset()

* minimize setters

* add resetTest

* remove haxe4 compile conditions (#2489)

* Release 4.11.0 (#2490)

* add release notes

* seg fault bugfix

* FlxSpriteGroup kill/revive

* change haxelib

* wording

* change date

Co-authored-by: Jens Fischer <jensfischer95@gmail.com>
Co-authored-by: Gliar <public.ms513@gmail.com>
Co-authored-by: Brett Chalupa <brettchalupa@gmail.com>
Co-authored-by: Julian Holfeld <julianholfeld@student.uni-kassel.de>
Co-authored-by: RafPlayz69YT <79861112+brosomethingwrongwithyothing@users.noreply.github.com>
Co-authored-by: Eric Myllyoja <ericmyllyoja@gmail.com>
Co-authored-by: MrClogsworthYT <85831572+MrClogsworthYT@users.noreply.github.com>
Co-authored-by: MrCheemsAndFriends <84867412+Cheemsandfriends@users.noreply.github.com>
Co-authored-by: jobf <jamesobfisher@gmail.com>
Co-authored-by: jf <j@b.f>
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.

FlxSpriteGroup's revive() will never call revive() on its children (i.e. its group's members)
1 participant