cocos2dxlua sprite

require "Cocos2d"
require "Cocos2dConstants"

local TestScene = class("TestScene",function()
    return cc.Scene:create()
end)

function TestScene.create()
    local scene = TestScene.new()
    local sp=cc.Sprite:create("dog.png")
    sp:setPosition(100,100)
    scene:addChild(sp)
    return scene
end


return TestScene

 

更多相关文章
一周排行
  • 自定義函數實現NULL值替換
    数据库环境:SQL SERVER 2005 有时候,想将查询查询数来的数据格式化一下,不希
  • ControlTemplate和DataTemplate两个类均派生自FrameworkTemplate类,这个类的FindName方法能检索其内部控件.示例如下: XAML代码: <Window x:Clas ...
  • 前期准备: yum install gcc gcc-c++ make cmake ncurses-devel bison perl #依赖包 建用户: groupadd mysql useradd mysql -s
  •  这里先说说两个概念:Theme(主题)和 Visual Style .Theme 最早出现在 Microsoft Plus! for Windows 95 中,是 Windows 中 Wallpaper.Curso
  • <a href=http://www.主页.cn/ rel=”nofollow”>这里是锚文字</a> <光年日志分析系统>来分析抓取比较多的是哪个网页,没用的nofllow 虽然 ...
  • linux执行free命令显示如下: [[email protected] /tmp]# free total used free shared buffers cached Mem: 4149156 4130412 18744
  • DP(POJ1159 POJ1458 POJ1141)
    POJ1159,动态规划经典题目,很适合初学者入门练手. 求:为了使字符串左右对称,应该插
  • 关于Jackrabbit To get started with Jackrabbit you should first become familiar with the JCR API. Download the 
  • Description Once upon a time an Eagle made a nest on the roof of a very large building. Time went by and som
  • Surface Flinger boot flow in Android system a executable surfaceflinger in framework/base/cmds/surfaceflinge