'2013/12'에 해당되는 글 65건
- 2013.12.11 유니티 2d 게임 개발
- 2013.12.10 추천 책
- 2013.12.10 [펌]유니티 구글드라이브 연동 소스
- 2013.12.10 패턴
- 2013.12.10 포물선 운동 관련 소스
- 2013.12.09 유니티 포물선 공식 (1)
- 2013.12.09 유니티 대화 예제
- 2013.12.09 유니티 text 파일로 저장하는 법
- 2013.12.06 gcm 예제
- 2013.12.06 [펌] 러너게임 질문
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 |
한빛미디어 - 세가의 신입 사원 교육 과정에서 배우는 게임 프로그래밍의 정석 (히라야마 타카시 / 김성훈 옮기)
에이콘 출판사 - XNA 4.0 Game Development by Example 한국어판 (커트 재거스 저 / 김동훈, 김유나 공역)
'보고싶은책' 카테고리의 다른 글
| 유니티 서적 (0) | 2013.12.11 |
|---|---|
| 유니티 중급 이상 책 (0) | 2013.12.11 |
| 추천 책 (0) | 2013.12.10 |
| 패턴 (0) | 2013.12.10 |
| 만들면서 이해하는 실전! Cocos2d-x 3.x 게임 프로그래밍 (0) | 2013.12.01 |
| cocos2d-x (0) | 2013.11.22 |
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 |
"실용주의 디자인 패턴"
'보고싶은책' 카테고리의 다른 글
| 유니티 중급 이상 책 (0) | 2013.12.11 |
|---|---|
| 추천 책 (0) | 2013.12.10 |
| 패턴 (0) | 2013.12.10 |
| 만들면서 이해하는 실전! Cocos2d-x 3.x 게임 프로그래밍 (0) | 2013.12.01 |
| cocos2d-x (0) | 2013.11.22 |
| 게임 매니악스 슈팅 게임 알고리즘 (0) | 2013.11.21 |
#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 |



GcmTest.zip


나중에 위치값만 옮겨주세요
a01 -> b01 -> c01 -> 했다 다시 a01 이 나오게 된다했을때 생성삭제보다는 화면밖에 있던 a01의 위치만 옮겨주는게
더 효율적일꺼 같네요
그리고 a01 - > a01 이 나올경우를 대비해 리소스는 2개씩 가지고 계시고 기획한 맵정보를 미리 읽어와서 쓰는 리소스들만
가지고계시다가 재활용하는게 나을것 같습니다