diff options
Diffstat (limited to 'demos/declarative/snake')
-rw-r--r-- | demos/declarative/snake/content/snake.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/demos/declarative/snake/content/snake.js b/demos/declarative/snake/content/snake.js index 102bd87..f5c231e 100644 --- a/demos/declarative/snake/content/snake.js +++ b/demos/declarative/snake/content/snake.js @@ -59,8 +59,7 @@ function startNewGame() console.log("Still loading linkComponent"); continue;//TODO: Better error handling? } - var link = linkComponent.createObject(); - link.parent = playfield; + var link = linkComponent.createObject(playfield); link.z = numRows * numColumns + 1 - i; link.type = i == 0 ? 2 : 0; link.spawned = false; @@ -300,8 +299,7 @@ function createCookie(value) { console.log("Still loading cookieComponent"); return;//TODO: Better error handling? } - cookie = cookieComponent.createObject(); - cookie.parent = head.parent; + cookie = cookieComponent.createObject(head.parent); cookie.value = value; cookie.row = row; cookie.column = column; |