KitcoonPoop
Based on game build 714014 | Last updated: 2026-03-08
Overview
KitcoonPoop is a UI widget that visually represents a single piece of poop in the Kitcoon Poop minigame. It creates an animated UI element using UIAnim, binds user interaction (accept control click) to gameplay logic (removing the poop), and manages its own lifecycle based on animation state.
Usage example
local kitcoonpoop = KitcoonPoop(kit, gamescreen, profile)
-- The widget is self-contained and self-deleting after interaction
-- It is typically added to a parent UI container by the minigame logic
Dependencies & tags
Components used: None identified
Tags: None identified
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
kit | table | — | Reference to the parent Kitcoon kit controller. |
gamescreen | table | — | Reference to the game screen managing the minigame instance. |
anim | UIAnim | instance | The child UI animation widget. |
animstate | AnimState | instance | Animation state controller for rendering and playing animations. |
onclick | function | function() | Callback invoked on user interaction (accept button press). Set to nil after use. |
Main functions
OnGainFocus()
- Description: Called when the widget gains keyboard/gamepad focus. Delegates to the parent
Widgetimplementation. - Parameters: None.
- Returns: Nothing.
OnUpdate(dt)
- Description: Periodically checks whether the "poop_gone" animation has finished. If so, destroys the widget.
- Parameters:
dt(number) - delta time in seconds. - Returns: Nothing.
OnControl(control, down)
- Description: Handles user input. Responds only to release of the accept control (e.g., mouse click or gamepad A button) and invokes
onclickif present. - Parameters:
control(string) - the control name (e.g.,CONTROL_ACCEPT).down(boolean) —trueif the control is pressed,falseon release.
- Returns:
trueif input was handled (prevents further propagation). - Error states: No-op if
downistrue, or ifonclickisnil.
Events & listeners
None identified