-
大小: 186KB文件类型: .zip金币: 1下载: 0 次发布日期: 2021-06-10
- 语言: 其他
- 标签: cocos2dx3.x physics
资源简介
cocos2dx模仿人要慌绳子的物理小demo,按住屏幕,左右来回移动,绳子也来回移动,松手之后绳子上的人物就抛出去,游戏结束。一个小demo,练习cc 3.x physics物理引擎
代码片段和文件信息
#include “AppDelegate.h“
#include “HelloWorldScene.h“
#include “Start_Scene.h“
USING_NS_CC;
AppDelegate::AppDelegate() {
}
AppDelegate::~AppDelegate()
{
}
bool AppDelegate::applicationDidFinishLaunching() {
// initialize director
auto director = Director::getInstance();
auto glview = director->getOpenGLView();
if(!glview) {
glview = GLView::create(“My Game“);
director->setOpenGLView(glview);
}
// turn on display FPS
director->setDisplayStats(true);
// set FPS. the default value is 1.0/60 if you don‘t call this
director->setAnimationInterval(1.0 / 60);
// create a scene. it‘s an autorelease object
auto scene = Start_Scene::CreateScene();
// run
director->runWithScene(scene);
return true;
}
// This function will be called when the app is inactive. When comes a phone callit‘s be invoked too
void AppDelegate::applicationDidEnterBackground() {
Director::getInstance()->stopAnimation();
// if you use SimpleAudioEngine it must be pause
// SimpleAudioEngine::getInstance()->pauseBackgroundMusic();
}
// this function will be called when the app is active again
void AppDelegate::applicationWillEnterForeground() {
Director::getInstance()->startAnimation();
// if you use SimpleAudioEngine it must resume here
// SimpleAudioEngine::getInstance()->resumeBackgroundMusic();
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2014-12-04 11:12 Classes\
文件 1389 2014-12-04 14:07 Classes\AppDelegate.cpp
文件 947 2014-05-28 10:23 Classes\AppDelegate.h
文件 12576 2014-12-09 22:22 Classes\HelloWorldScene.cpp
文件 1227 2014-12-09 22:22 Classes\HelloWorldScene.h
文件 1098 2014-12-04 22:33 Classes\Start_Scene.cpp
文件 313 2014-12-04 14:33 Classes\Start_Scene.h
目录 0 2014-12-06 20:37 Resources\
文件 3489 2014-12-06 21:52 Resources\ball.png
文件 2175 2014-12-04 11:00 Resources\bird.plist
文件 313 2014-12-04 11:00 Resources\bird.png
文件 6311 2014-05-28 10:23 Resources\CloseNormal.png
文件 5499 2014-05-28 10:23 Resources\CloseSelected.png
目录 0 2014-05-30 09:42 Resources\fonts\
文件 25776 2014-05-28 10:23 Resources\fonts\Marker Felt.ttf
文件 138777 2014-05-28 10:23 Resources\HelloWorld.png
文件 9468 2013-04-03 08:25 Resources\sp.png
文件 1528 2014-02-09 18:25 Resources\start_btn.png
- 上一篇:俄语的字库
- 下一篇:kemans聚类用的数据--包含多个数据
相关资源
- COMSOL Multiphysics 5.0破解license
- cocos2dx3.x使用socket创建服务端和客户端
- COMSOL+Multiphysics-抛物型方程求解热传导
- LMCOMSOL_Multiphysics_SSQ.7z
- NWH Vehicle Physics.txt
- ComsolMultiphysics5.3aCrack.rar
- NWH Vehicle Physics 1.7.2
- Game Physics Cookbook 无水印原版pdf
- Jello-Physics unity 模拟柔体 果冻效果插
- comsol Multiphysics 4.2安装镜像 ISO+教程
评论
共有 条评论