HaxeFlixel / HaxeFlixel/flixel

add onAdded/onRemoved?

Open
#3,152 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Improvement New Feature
Dominant language
Haxe
Stars
2.2k
Forks
522
Avg merge
34m
Merged PRs (30d)
1

Description

A signal (maybe typed) called when a FlxBasic's container is changed

Downsides

This can get kinda hairy with adding/removing destroyed things, some options:

  • Make these signals final onAdded = new FlxSignal(); and only clear it in destroy
  • Don't use a signal just have a function setContainer(value) { container = value; } that can be extended. Note: i'm not really into haxe's setters for this case. for reasons I'll list, upon request

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating FlxBasic and its container assignment path. Compare the proposed onAdded/onRemoved signals with an overridable setContainer function, including behavior for destroyed objects; done requires a settled API design and corresponding tests, but the issue names no test files.

Written by the indexing model from the issue text.

Assessment

Domain
game-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.