I have this line of code in my game logic class. and I have tried with all best way to load this player sprite in corona code but the object player is “nil” again and again.
local physics = require(“physics”)
physics.start()
–physics.setDrawMode( “hybrid” )
display.setStatusBar( display.HiddenStatusBar )
require “LevelHelperLoader”
local localGroup = display.newGroup()
application.LevelHelperSettings.directorGroup = localGroup
loader = LevelHelperLoader:initWithContentOfFile(“advent_level1.plhs”)
loader:instantiateObjectsInGroup(physics,localGroup)
local player = loader:spriteWithUniqueName(“player”)
I have tried to change its state to dynamic or kinematic but it doesn’t effect.
Can any one help me to resolve this issue. Thanks in advance
[import]uid: 124018 topic_id: 25327 reply_id: 325327[/import]
[import]uid: 52491 topic_id: 25327 reply_id: 102390[/import]