Skip to content

Commit

Permalink
fixed broken Start function
Browse files Browse the repository at this point in the history
  • Loading branch information
iLauncherDev committed Sep 18, 2024
1 parent 97c8c7f commit 46351a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
do not draw objects off the screen
added globalLight
added two stages update_function
fixed broken Start function

# 0.5.3
optimized zOrder and priority
Expand Down
4 changes: 2 additions & 2 deletions iLGE-2d.js
Original file line number Diff line number Diff line change
Expand Up @@ -3153,9 +3153,9 @@ class iLGE_2D_Engine {
if (component.type === iLGE_2D_GameObject_Component_Type_Script) {
component.object = object;

if (typeof component.Start === "function" && component.Started) {
if (typeof component.Start === "function" && !component.Started) {
component.Start(this);
component.Started = false;
component.Started = true;
}

if (typeof component.Update === "function")
Expand Down

0 comments on commit 46351a5

Please sign in to comment.