'잡다한것들전부'에 해당되는 글 207건
- 2013.12.11 2d 게임 만들때 필수이 에셋
- 2013.12.11 유니티 2d rpg 개발
- 2013.12.11 유니티 2d 게임 개발
- 2013.12.10 [펌]유니티 구글드라이브 연동 소스
- 2013.12.10 포물선 운동 관련 소스
- 2013.12.09 유니티 포물선 공식 (1)
- 2013.12.09 유니티 대화 예제
- 2013.12.09 유니티 text 파일로 저장하는 법
- 2013.12.06 gcm 예제
- 2013.12.06 [펌] 유니티 런닝게임 관련 질문
2DToolkit + NGUI의 조합이 현재 4.x대 버전에서는 그나마 최강의 조합입니다.
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 메모리 문제 (0) | 2013.12.11 |
|---|---|
| 게임 개발 공부 방법 (0) | 2013.12.11 |
| 2d 게임 만들때 필수이 에셋 (0) | 2013.12.11 |
| 유니티 2d rpg 개발 (0) | 2013.12.11 |
| 유니티 2d 게임 개발 (0) | 2013.12.11 |
| [펌]유니티 구글드라이브 연동 소스 (0) | 2013.12.10 |
http://gamedevelopment.tutsplus.com/articles/how-to-build-a-jrpg-a-primer-for-game-developers--gamedev-6676
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 게임 개발 공부 방법 (0) | 2013.12.11 |
|---|---|
| 2d 게임 만들때 필수이 에셋 (0) | 2013.12.11 |
| 유니티 2d rpg 개발 (0) | 2013.12.11 |
| 유니티 2d 게임 개발 (0) | 2013.12.11 |
| [펌]유니티 구글드라이브 연동 소스 (0) | 2013.12.10 |
| 유니티 포물선 공식 (1) | 2013.12.09 |
http://pixelnest.io/tutorials/2d-game-unity/
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 2d 게임 만들때 필수이 에셋 (0) | 2013.12.11 |
|---|---|
| 유니티 2d rpg 개발 (0) | 2013.12.11 |
| 유니티 2d 게임 개발 (0) | 2013.12.11 |
| [펌]유니티 구글드라이브 연동 소스 (0) | 2013.12.10 |
| 유니티 포물선 공식 (1) | 2013.12.09 |
| 유니티 대화 예제 (0) | 2013.12.09 |
Google Drive for Unity3D
Google Drive for Unity3D plugin.
Upload, explore, download files in someone's Google Drive.
And store your secure data such as score with AppData.
GitHub: https://github.com/midworld/unity-googledrive
and Doxygen Docs
Code:
var drive = new GoogleDrive(); drive.ClientID = "YOUR CLIENT ID"; drive.ClientSecret = "YOUR CLIENT SECRET"; // Request authorization. if (authorization.Current is Exception) { yield break; } // Authorization succeeded. // Upload a text file. // Get all files. var listFiles = drive.ListAllFiles(); var files = GoogleDrive.GetResult<List<GoogleDrive.File>>(listFiles); if (files != null) { foreach (var file in files) { // Download a text file and print. if (file.Title.EndsWith(".txt")) { var download = drive.DownloadFile(file); } } }
Code:
// Upload score in 'AppData'. int score = 10000; // User cannot see 'score.txt'. Only your app can see this file.
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 유니티 2d rpg 개발 (0) | 2013.12.11 |
|---|---|
| 유니티 2d 게임 개발 (0) | 2013.12.11 |
| [펌]유니티 구글드라이브 연동 소스 (0) | 2013.12.10 |
| 유니티 포물선 공식 (1) | 2013.12.09 |
| 유니티 대화 예제 (0) | 2013.12.09 |
| 유니티 text 파일로 저장하는 법 (0) | 2013.12.09 |
#include "HelloWorldScene.h"
#include "SimpleAudioEngine.h"
using namespace cocos2d;
using namespace CocosDenshion;
CCScene* HelloWorld::scene()
{
// 'scene' is an autorelease object
CCScene *scene = CCScene::create();
// 'layer' is an autorelease object
HelloWorld *layer = HelloWorld::create();
// add layer as a child to scene
scene->addChild(layer);
// return the scene
return scene;
}
// on "init" you need to initialize your instance
bool HelloWorld::init()
{
//////////////////////////////
// 1. super init first
if ( !CCLayer::init() )
{
return false;
}
/////////////////////////////
// 2. add a menu item with "X" image, which is clicked to quit the program
// you may modify it.
// add a "close" icon to exit the progress. it's an autorelease object
CCMenuItemImage *pCloseItem = CCMenuItemImage::create(
"CloseNormal.png",
"CloseSelected.png",
this,
menu_selector(HelloWorld::menuCloseCallback) );
pCloseItem->setPosition( ccp(CCDirector::sharedDirector()->getWinSize().width - 20, 20) );
// create menu, it's an autorelease object
CCMenu* pMenu = CCMenu::create(pCloseItem, NULL);
pMenu->setPosition( CCPointZero );
this->addChild(pMenu, 1);
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
sprite = CCSprite::create("CloseNormal.png");
this->addChild(sprite);
sprite->setPosition(ccp(20, winSize.height/2));
//힘
int Force = 5;
//각도 조절
float x = Force * cos(25);
float y = Force * sin(25);
//벡터값
vector = CCPoint(x, y);
time = 0.0f;
initPos = sprite->getPosition();
CCLog("%f, %f" , x,y);
this->schedule(schedule_selector(HelloWorld::gameLogic));
return true;
}
void HelloWorld::gameLogic(float dt)
{
CCSize winSize = CCDirector::sharedDirector()->getWinSize();
//CCLog("gameLogic!");
time += dt;
//시간에 따른 포물선 운동 공식
float x = vector.x * time;
float y = vector.y * time - (9.8f/2.0f * time * time);
CCPoint pos = sprite->getPosition();
sprite->setPosition(ccp(pos.x+x,pos.y+y));
if(sprite->getPositionY() < 0)
{
time = 0;
sprite->setPosition(ccp(20, winSize.height/2));
}
}
void HelloWorld::menuCloseCallback(CCObject* pSender)
{
CCDirector::sharedDirector()->end();
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
exit(0);
#endif
}
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 중급 개발자가 되는 방법 5가지 (0) | 2013.12.16 |
|---|---|
| 배경 무한 스크롤링 (0) | 2013.12.11 |
| 포물선 운동 관련 소스 (0) | 2013.12.10 |
| 헥사 게임 알고리즘 (0) | 2013.12.03 |
| 비쥬얼드 로직 (0) | 2013.12.02 |
| 비쥬얼드 3개 블록 맞추는 로직 (0) | 2013.12.02 |
x = S.x + V.x * t;
y = S.y + (V.y * t) - ((1/2) * g * t * t);
z = S.z + V.z * t;
t는 시간
S는 시작위치
g는 중력 가속도이지만 반드시 9.8일 필요는 없고 실제 게임에서 자연스럽게 보이는 값을 지정.
특정시간은 t의 값에 그 시간을 넣고 x,y,z를 최종위치값으로 넣어서 V값을 역산해 결정한 다음
매 프레임마다 t값을 갱신해 가면서 x, y, z를 구하시면 됨
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 유니티 2d 게임 개발 (0) | 2013.12.11 |
|---|---|
| [펌]유니티 구글드라이브 연동 소스 (0) | 2013.12.10 |
| 유니티 포물선 공식 (1) | 2013.12.09 |
| 유니티 대화 예제 (0) | 2013.12.09 |
| 유니티 text 파일로 저장하는 법 (0) | 2013.12.09 |
| [펌] 유니티 런닝게임 관련 질문 (0) | 2013.12.06 |
http://code.google.com/p/shadow-force/source/browse/trunk/Assets/Scripts/Misc/InitLevelManager.cs?r=18
public class InitLevelManager : MonoBehaviour
{
public Texture2D splash;
private Texture2D background;
private bool loading = true;
void Start ()
{
background = new Texture2D (2, 2);
background.SetPixels (new Color[] {Color.black, Color.black, Color.black, Color.black});
background.Apply ();
DontDestroyOnLoad (gameObject);
Application.LoadLevel (Application.loadedLevel + 1);
}
void OnLevelWasLoaded (int level)
{
loading = false;
}
void OnGUI ()
{
if (!loading)
{
return;
}
float splashWidth = splash.width, splashHeight = splash.height;
if (splashWidth > Screen.width)
{
float scale = Screen.width / splashWidth;
splashWidth *= scale;
splashHeight *= scale;
}
GUI.DrawTexture (new Rect (0.0f, 0.0f, Screen.width, Screen.height), background);
GUI.DrawTexture (
new Rect (
(Screen.width - splashWidth) * 0.5f,
(Screen.height - splashHeight) * 0.5f,
splashWidth,
splashHeight
),
splash
);
}
'잡다한것들전부 > 팁' 카테고리의 다른 글
| [펌]유니티 구글드라이브 연동 소스 (0) | 2013.12.10 |
|---|---|
| 유니티 포물선 공식 (1) | 2013.12.09 |
| 유니티 대화 예제 (0) | 2013.12.09 |
| 유니티 text 파일로 저장하는 법 (0) | 2013.12.09 |
| [펌] 유니티 런닝게임 관련 질문 (0) | 2013.12.06 |
| [펌] 유니티 러너 게임 질문 (0) | 2013.12.06 |
import System; import System.IO; var fileName = "MyFile.txt"; { if (File.Exists(fileName)) { return; } var sr = File.CreateText(fileName); sr.WriteLine ("This is my file."); sr.WriteLine ("I can write ints {0} or floats {1}, and so on.", 1, 4.2); }
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 유니티 포물선 공식 (1) | 2013.12.09 |
|---|---|
| 유니티 대화 예제 (0) | 2013.12.09 |
| 유니티 text 파일로 저장하는 법 (0) | 2013.12.09 |
| [펌] 유니티 런닝게임 관련 질문 (0) | 2013.12.06 |
| [펌] 유니티 러너 게임 질문 (0) | 2013.12.06 |
| [펌] 유니티 메모리 관리 (0) | 2013.12.05 |
'잡다한것들전부 > 안드로이드' 카테고리의 다른 글
| 안드로이드 동적 생성 view button progressbar 등 (0) | 2014.01.06 |
|---|---|
| 뒤로가기 버튼 클릭시 종료 팝업후 종료 하기 (0) | 2013.12.30 |
| INSTALL_FAILED_INSUFFICIENT_STORAGE 오류시 (0) | 2013.12.30 |
| Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE (0) | 2013.12.16 |
| 프로젝트 오른쪽클릭 ->안드로이드툴->Fix 클릭 하시면되용 (0) | 2013.12.16 |
| gcm 예제 (0) | 2013.12.06 |
출처:http://devkorea.co.kr/bbs/board.php?bo_table=m03_qna&wr_id=35122&sca=&sfl=wr_subject||wr_content&stx=%EB%A7%B5+%EC%83%9D%EC%84%B1&sop=and¤tId=44
[Unity3D] 런닝게임 맵 로드 && 맵 이동 질문드려욤..
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 유니티 대화 예제 (0) | 2013.12.09 |
|---|---|
| 유니티 text 파일로 저장하는 법 (0) | 2013.12.09 |
| [펌] 유니티 런닝게임 관련 질문 (0) | 2013.12.06 |
| [펌] 유니티 러너 게임 질문 (0) | 2013.12.06 |
| [펌] 유니티 메모리 관리 (0) | 2013.12.05 |
| 유니티 게임 매니저 관련 글 (0) | 2013.12.05 |



GcmTest.zip


지키수쿠님 말씀대로라면 3개의 맵을 모두 로드해놓은 상태에서 카메라 밖에 안보이게 로드해놓은 상태에서 필요한 맵만 흐르도록해서 카메라에 비춰지도록 해준다는 말씀이시죠??SetActivite(true) or SetActivite(false) 시킬필요 없이말이죠?
그렇다면 지키수쿠님은 카메라시야에서 사라진 첫번째 맵은 어떻게 뒤로 보내시나요??
MapA.transform.position = new Vector3(30, 0, 0);이렇게 MapA를 MapC뒤로 붙이도록 하시나요?
그 위에 장애물 같은 것은 일정 규칙에 따라 생성하시고..
장애물을 실시간으로 계속 instantiate로 생성하시면 성능 부하가 생기니까
오브젝트 풀을 사용하셔요