实例介绍
俄罗斯方块游戏 cocos2d-x 3.4 版本。用 cocos2d-x 3.4 生成一个新项目,然后把新项目内的 cocos2d 文件夹拷贝到下载解压后的俄罗斯方块游戏目录里即可编译运行。
【实例截图】
【核心代码】
5aed1e85-0565-4d6d-b2d7-07768c08a042
└── tetris
├── Classes
│ ├── AppDelegate.cpp
│ ├── AppDelegate.h
│ ├── Blocks
│ │ ├── BasicBlock.cpp
│ │ ├── BasicBlock.h
│ │ ├── Block_I.cpp
│ │ ├── Block_I.h
│ │ ├── Block_J.cpp
│ │ ├── Block_J.h
│ │ ├── Block_L.cpp
│ │ ├── Block_L.h
│ │ ├── Block_O.cpp
│ │ ├── Block_O.h
│ │ ├── Block_S.cpp
│ │ ├── Block_S.h
│ │ ├── Block_T.cpp
│ │ ├── Block_T.h
│ │ ├── Block_Z.cpp
│ │ └── Block_Z.h
│ ├── blocks.h
│ ├── Controller.cpp
│ ├── Controller.h
│ ├── Grids
│ │ ├── Cube.cpp
│ │ ├── Cube.h
│ │ ├── Edge.cpp
│ │ ├── Edge.h
│ │ ├── Square.cpp
│ │ └── Square.h
│ ├── Layers
│ │ ├── SquareLayer.cpp
│ │ ├── SquareLayer.h
│ │ ├── TitleLayer.cpp
│ │ └── TitleLayer.h
│ ├── layers.h
│ ├── macros.h
│ ├── resource.h
│ ├── Scenes
│ │ ├── BasicScene.cpp
│ │ ├── BasicScene.h
│ │ ├── PlayScene.cpp
│ │ ├── PlayScene.h
│ │ ├── TitleScene.cpp
│ │ └── TitleScene.h
│ └── scenes.h
├── CMakeLists.txt
├── proj.android
│ ├── AndroidManifest.xml
│ ├── ant.properties
│ ├── build-cfg.json
│ ├── build_native.py
│ ├── build.xml
│ ├── jni
│ │ ├── Android.mk
│ │ ├── Application.mk
│ │ └── hellocpp
│ │ └── main.cpp
│ ├── proguard-project.txt
│ ├── project.properties
│ ├── res
│ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ ├── drawable-ldpi
│ │ │ └── icon.png
│ │ ├── drawable-mdpi
│ │ │ └── icon.png
│ │ └── values
│ │ └── strings.xml
│ └── src
│ └── org
│ └── cocos2dx
│ └── cpp
│ └── AppActivity.java
├── proj.ios_mac
│ ├── ios
│ │ ├── AppController.h
│ │ ├── AppController.mm
│ │ ├── Default@2x.png
│ │ ├── Default-568h@2x.png
│ │ ├── Default-667h@2x.png
│ │ ├── Default-736h@3x.png
│ │ ├── Default.png
│ │ ├── Icon-100.png
│ │ ├── Icon-114.png
│ │ ├── Icon-120.png
│ │ ├── Icon-144.png
│ │ ├── Icon-152.png
│ │ ├── Icon-29.png
│ │ ├── Icon-40.png
│ │ ├── Icon-50.png
│ │ ├── Icon-57.png
│ │ ├── Icon-58.png
│ │ ├── Icon-72.png
│ │ ├── Icon-76.png
│ │ ├── Icon-80.png
│ │ ├── Info.plist
│ │ ├── main.m
│ │ ├── Prefix.pch
│ │ ├── RootViewController.h
│ │ └── RootViewController.mm
│ ├── mac
│ │ ├── Icon.icns
│ │ ├── Info.plist
│ │ ├── main.cpp
│ │ └── Prefix.pch
│ └── tetris.xcodeproj
│ └── project.pbxproj
├── proj.linux
│ └── main.cpp
├── proj.win32
│ ├── build-cfg.json
│ ├── game.rc
│ ├── main.cpp
│ ├── main.h
│ ├── res
│ │ └── game.ico
│ ├── resource.h
│ ├── tetris.props
│ ├── tetris.sln
│ ├── tetris.vcxproj
│ ├── tetris.vcxproj.filters
│ └── tetris.vcxproj.user
├── proj.win8.1-universal
│ ├── App.Shared
│ │ ├── App.xaml
│ │ ├── App.xaml.cpp
│ │ ├── App.xaml.h
│ │ ├── Cocos2dRenderer.cpp
│ │ ├── Cocos2dRenderer.h
│ │ ├── OpenGLES.cpp
│ │ ├── OpenGLES.h
│ │ ├── OpenGLESPage.xaml
│ │ ├── OpenGLESPage.xaml.cpp
│ │ ├── OpenGLESPage.xaml.h
│ │ ├── pch.cpp
│ │ ├── pch.h
│ │ ├── tetris.Shared.vcxitems
│ │ └── tetris.Shared.vcxitems.filters
│ ├── App.Windows
│ │ ├── Assets
│ │ │ ├── Logo.scale-100.png
│ │ │ ├── SmallLogo.scale-100.png
│ │ │ ├── SplashScreen.scale-100.png
│ │ │ └── StoreLogo.scale-100.png
│ │ ├── Package.appxmanifest
│ │ ├── tetris.Windows_TemporaryKey.pfx
│ │ ├── tetris.Windows.vcxproj
│ │ └── tetris.Windows.vcxproj.filters
│ ├── App.WindowsPhone
│ │ ├── Assets
│ │ │ ├── Logo.scale-240.png
│ │ │ ├── SmallLogo.scale-240.png
│ │ │ ├── SplashScreen.scale-240.png
│ │ │ ├── Square71x71Logo.scale-240.png
│ │ │ ├── StoreLogo.scale-240.png
│ │ │ └── WideLogo.scale-240.png
│ │ ├── Package.appxmanifest
│ │ ├── tetris.WindowsPhone.vcxproj
│ │ └── tetris.WindowsPhone.vcxproj.filters
│ └── tetris.sln
├── proj.wp8-xaml
│ ├── App
│ │ ├── App.xaml
│ │ ├── App.xaml.cs
│ │ ├── Assets
│ │ │ ├── AlignmentGrid.png
│ │ │ ├── ApplicationIcon.png
│ │ │ └── Tiles
│ │ │ ├── FlipCycleTileLarge.png
│ │ │ ├── FlipCycleTileMedium.png
│ │ │ ├── FlipCycleTileSmall.png
│ │ │ ├── IconicTileMediumLarge.png
│ │ │ └── IconicTileSmall.png
│ │ ├── EditBox.xaml
│ │ ├── EditBox.xaml.cs
│ │ ├── LocalizedStrings.cs
│ │ ├── MainPage.xaml
│ │ ├── MainPage.xaml.cs
│ │ ├── Properties
│ │ │ ├── AppManifest.xml
│ │ │ ├── AssemblyInfo.cs
│ │ │ └── WMAppManifest.xml
│ │ ├── Resources
│ │ │ ├── AppResources.Designer.cs
│ │ │ └── AppResources.resx
│ │ ├── SplashScreenImage.jpg
│ │ └── tetris.csproj
│ ├── AppComponent
│ │ ├── src
│ │ │ ├── Cocos2dRenderer.cpp
│ │ │ ├── Cocos2dRenderer.h
│ │ │ ├── Direct3DContentProvider.cpp
│ │ │ ├── Direct3DContentProvider.h
│ │ │ ├── Direct3DInterop.cpp
│ │ │ ├── Direct3DInterop.h
│ │ │ ├── DirectXBase.cpp
│ │ │ ├── DirectXBase.h
│ │ │ ├── DirectXHelper.h
│ │ │ ├── EditBoxEvent.cpp
│ │ │ ├── EditBoxEvent.h
│ │ │ ├── pch.cpp
│ │ │ └── pch.h
│ │ ├── tetrisComponent.vcxproj
│ │ └── tetrisComponent.vcxproj.filters
│ └── tetris.sln
└── Resources
├── animations
│ ├── grossini.plist
│ └── grossini.png
├── CloseNormal.png
├── CloseSelected.png
├── fonts
│ ├── arial.ttf
│ └── Marker Felt.ttf
├── HelloWorld.png
├── images
│ ├── grid_atlas.png
│ └── title.png
├── music
│ ├── bradinsky.mp3
│ ├── dance.mp3
│ ├── karinka.mp3
│ ├── levelup.mp3
│ ├── loginska.mp3
│ ├── lose.mp3
│ ├── title.mp3
│ └── troika.mp3
├── res
└── sound
├── clean.mp3
└── stick.mp3
46 directories, 187 files
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论