mirror of https://github.com/axmolengine/axmol.git
make it work with release mode on arm64 bit (#17057)
This commit is contained in:
parent
fe2b2a4fbb
commit
20d8ef9584
|
@ -7,7 +7,7 @@ local function ComponentTestLayer()
|
||||||
layer:addChild(bgLayer);
|
layer:addChild(bgLayer);
|
||||||
|
|
||||||
-- create game scene
|
-- create game scene
|
||||||
local sceneLuaComponent = cc.ComponentLua:create("src/ComponentTest/scene.lua");
|
local sceneLuaComponent = cc.ComponentLua:create("ComponentTest/scene.lua");
|
||||||
sceneLuaComponent:setName("sceneLuaComponent");
|
sceneLuaComponent:setName("sceneLuaComponent");
|
||||||
layer:addComponent(sceneLuaComponent);
|
layer:addComponent(sceneLuaComponent);
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ local function ComponentTestLayer()
|
||||||
local origin = cc.Director:getInstance():getVisibleOrigin();
|
local origin = cc.Director:getInstance():getVisibleOrigin();
|
||||||
player:setPosition(origin.x + player:getContentSize().width/2,
|
player:setPosition(origin.x + player:getContentSize().width/2,
|
||||||
origin.y + visibleSize.height/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);
|
player:addComponent(playerComponent);
|
||||||
layer:addChild(player);
|
layer:addChild(player);
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
local player = {
|
local player = {
|
||||||
generateProjectile = function (self, x, y)
|
generateProjectile = function (self, x, y)
|
||||||
local projectile = cc.Sprite:create("components/Projectile.png", cc.rect(0, 0, 20, 20))
|
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)
|
projectile:addComponent(scriptComponent)
|
||||||
self:getOwner():getParent():addChild(projectile)
|
self:getOwner():getParent():addChild(projectile)
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@ local scene = {
|
||||||
addNewEnemy = function(self)
|
addNewEnemy = function(self)
|
||||||
local owner = self:getOwner()
|
local owner = self:getOwner()
|
||||||
local enemy = cc.Sprite:create("components/Target.png")
|
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)
|
enemy:addComponent(enemyLuaComponent)
|
||||||
owner:addChild(enemy)
|
owner:addChild(enemy)
|
||||||
table.insert(self.enemies, enemy)
|
table.insert(self.enemies, enemy)
|
||||||
|
|
Loading…
Reference in New Issue