make it work with release mode on arm64 bit (#17057)

This commit is contained in:
minggo 2016-12-23 16:44:29 +08:00 committed by GitHub
parent fe2b2a4fbb
commit 20d8ef9584
3 changed files with 4 additions and 4 deletions

View File

@ -7,7 +7,7 @@ local function ComponentTestLayer()
layer:addChild(bgLayer);
-- create game scene
local sceneLuaComponent = cc.ComponentLua:create("src/ComponentTest/scene.lua");
local sceneLuaComponent = cc.ComponentLua:create("ComponentTest/scene.lua");
sceneLuaComponent:setName("sceneLuaComponent");
layer:addComponent(sceneLuaComponent);
@ -17,7 +17,7 @@ local function ComponentTestLayer()
local origin = cc.Director:getInstance():getVisibleOrigin();
player:setPosition(origin.x + player:getContentSize().width/2,
origin.y + visibleSize.height/2);
local playerComponent = cc.ComponentLua:create("src/ComponentTest/player.lua");
local playerComponent = cc.ComponentLua:create("ComponentTest/player.lua");
player:addComponent(playerComponent);
layer:addChild(player);

View File

@ -2,7 +2,7 @@
local player = {
generateProjectile = function (self, x, y)
local projectile = cc.Sprite:create("components/Projectile.png", cc.rect(0, 0, 20, 20))
local scriptComponent = cc.ComponentLua:create("src/ComponentTest/projectile.lua")
local scriptComponent = cc.ComponentLua:create("ComponentTest/projectile.lua")
projectile:addComponent(scriptComponent)
self:getOwner():getParent():addChild(projectile)

View File

@ -24,7 +24,7 @@ local scene = {
addNewEnemy = function(self)
local owner = self:getOwner()
local enemy = cc.Sprite:create("components/Target.png")
local enemyLuaComponent = cc.ComponentLua:create("src/ComponentTest/enemy.lua")
local enemyLuaComponent = cc.ComponentLua:create("ComponentTest/enemy.lua")
enemy:addComponent(enemyLuaComponent)
owner:addChild(enemy)
table.insert(self.enemies, enemy)