'2013/12'에 해당되는 글 65건
- 2013.12.02 비쥬얼드 3개 블록 맞추는 로직
- 2013.12.02 cocos2d-x 3.0 관련 컴포넌트 사용
- 2013.12.02 ios7 UITableView 사용시 배경화면 흰색으로 나오는 현상
- 2013.12.02 iOS7 상태바 안보이게 설정하기
- 2013.12.01 만들면서 이해하는 실전! Cocos2d-x 3.x 게임 프로그래밍
var grid:Array = [[2,3,2,2,2,4],
[ .. ]]; //multidimensional array
var matches:uint;
var gemType:uint;
for(col = 0; col < grid.length; col++){
matches = 0;
gemType = 0; //Reserve 0 for the empty state. If we make it a normal gem type, then only 2 are needed to match for the start.
for(i = 0; i < grid[0].length; i++){
if(grid[col][i] == gemType){
matches++;
}
if(grid[col][i] != gemType || i == grid[0].length - 1){ //subtract 1 because arrays start at 0
if(matches >= 3){
removeMatches(blah);
}
gemType = grid[col][i];
matches = 1;
}
}
}int item = grid[x,y];
if(grid[x-1,y]==item)
{
int step=x;
int matches =2;
while(grid[step-1,y]==item)
{
step++;
matches++
}
if(matches>2)
//remove all matching items
}
else if(grid[x+1,y]==item
//....
else if(grid[x,y-1==item)
//...
else if(grid[x,y+1]==item)
//... public int getHMatchSize(int row, int column)
{
int returnMe = getMatchValue(row, 0, column, 1);
if (returnMe < 3)
{
return 0;
}
else return returnMe;
}
public int getVMatchSize(int row, int column)
{
int returnMe = getMatchValue(row, 1, column, 0);
if (returnMe < 3)
{
return 0;
}
else return returnMe;
}
/// <summary>
/// I return the match size.
/// </summary>
/// <param name="row"></param>
/// <param name="rowDelta">1 means look vertically. Dont set both deltas to 1.</param>
/// <param name="column"></param>
/// <param name="columnDelta">1 means look horizontally. Dont set both deltas to 1.</param>
/// <returns>The number of contiguous matching things</returns>
public int getMatchValue(int row, int rowDelta, int column, int columnDelta)
{
int[] start = getEndItem(row, -1 * rowDelta, column, -1 * columnDelta);
int[] end = getEndItem(row, rowDelta, column, columnDelta);
int returnMe = 0;
returnMe += end[0] - start[0];
returnMe += end[1] - start[1];
return returnMe;
}
/// <summary>
/// I will return the end of a sequence of matching items.
/// </summary>
/// <param name="row">start here</param>
/// <param name="column">start here</param>
private int[] getEndItem(int row, int rowDelta, int column, int columnDelta)
{
Gem matchGem = new Gem(-1);
int[] returnMe = new int[2];
if (boardSpace[row + rowDelta][column + columnDelta] == boardSpace[row][column])
{
return getEndItem(row + rowDelta, rowDelta, column + columnDelta, columnDelta);
}
else
{
returnMe[0] = row;
returnMe[1] = column;
return returnMe;
}
}'잡다한것들전부 > 팁' 카테고리의 다른 글
| 헥사 게임 알고리즘 (0) | 2013.12.03 |
|---|---|
| 비쥬얼드 로직 (0) | 2013.12.02 |
| 비쥬얼드 3개 블록 맞추는 로직 (0) | 2013.12.02 |
| cocos2d-x 3.0 관련 컴포넌트 사용 (0) | 2013.12.02 |
| ios7 UITableView 사용시 배경화면 흰색으로 나오는 현상 (0) | 2013.12.02 |
| iOS7 상태바 안보이게 설정하기 (0) | 2013.12.02 |
참고하시면 좋을것 같아서 퍼옵니다.
출처 : http://www.dev3d.net/bbs/view.php?id=pds&page=3&sn1=&divpage=1&sn=off&ss=on&sc=on&select_arrange=headnum&desc=asc&no=106
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 비쥬얼드 로직 (0) | 2013.12.02 |
|---|---|
| 비쥬얼드 3개 블록 맞추는 로직 (0) | 2013.12.02 |
| cocos2d-x 3.0 관련 컴포넌트 사용 (0) | 2013.12.02 |
| ios7 UITableView 사용시 배경화면 흰색으로 나오는 현상 (0) | 2013.12.02 |
| iOS7 상태바 안보이게 설정하기 (0) | 2013.12.02 |
| 관련 사이트 (0) | 2013.11.20 |
ios7은 UITableView의 셀 배경이 기본으로 흰색으로 설정되있는 것 같습니다.
cellForRowAtIndexPath 함수에 아래의 내용을 추가합니다.
cell.backgroundColor = [UIColor clearColor]; cell.backgroundView = [[UIView new] autorelease]; cell.selectedBackgroundView = [[UIView new] autorelease];
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 비쥬얼드 로직 (0) | 2013.12.02 |
|---|---|
| 비쥬얼드 3개 블록 맞추는 로직 (0) | 2013.12.02 |
| cocos2d-x 3.0 관련 컴포넌트 사용 (0) | 2013.12.02 |
| ios7 UITableView 사용시 배경화면 흰색으로 나오는 현상 (0) | 2013.12.02 |
| iOS7 상태바 안보이게 설정하기 (0) | 2013.12.02 |
| 관련 사이트 (0) | 2013.11.20 |
iOS가 7 로 되면서 시간과 배터리 등의 정보가
상태바에 표시되는 증상이 있습니다. into.plist 파일에 View controller-based status bar appearance를 Add
Row하시고 속성값을 NO로 세팅해주면 됩니다. 이런 현상이 사라지게 됩니다.
'잡다한것들전부 > 팁' 카테고리의 다른 글
| 비쥬얼드 로직 (0) | 2013.12.02 |
|---|---|
| 비쥬얼드 3개 블록 맞추는 로직 (0) | 2013.12.02 |
| cocos2d-x 3.0 관련 컴포넌트 사용 (0) | 2013.12.02 |
| ios7 UITableView 사용시 배경화면 흰색으로 나오는 현상 (0) | 2013.12.02 |
| iOS7 상태바 안보이게 설정하기 (0) | 2013.12.02 |
| 관련 사이트 (0) | 2013.11.20 |
|
* 실전 게임 제작 과정을 통해 cocos2d-x 3.0 핵심 기능과 모바일 게임 제작 원리 습득!이 책은 인기 모바일 게임인 독도방위사령부 게임을 만드는 일련의 과정을 따라하는 것만으로도 cocos2d-x 3.0의 핵심 기능과 게임 제작 원리를 한 번에 습득할 수 있게 구성하였다. 프로젝트 생성 방법, 게임 화면 만들기, 멀티 해상도 이해, 다양한 유닛 추가 방법, 유닉에 액션 설정, 이미지 블랜딩을 이용한 다양한 효과 만들기, 폭발과 애니메이션 만들기, 터치이벤트, 무기 발사와 충돌, 점수판 만들기, 게임 타이틀 화면 만들고 전환, 사운드 추가, 팝업 다이얼로그, 데이터 저장과 읽기, 게임에 sns 설정, 파티글 시스템 사용, 가속도 센서 기능을 실습하며 게임을 완성한다. 게임을 만들면서 다양한 코코스... |

국내 최초로 3.x 버전 cocos2d-x 관련 서적.
12월 5일날 출시된다고 합니다.
내용이 괜찮으면 보고 리뷰 남겨야겠습니다.
'보고싶은책' 카테고리의 다른 글
| 추천 책 (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 |
| cocos2d-x책 (0) | 2013.10.11 |
kasa080622cppcompsys.ppt


