안드로이드 cocos2d 강좌/cocos2d 안드로이드 클래스 심화

CCGridSize 클래스 분석 (미친척하고 해보자 cocos2d for androd)

수다쟁이증후군 2011. 9. 10. 03:00
cocos2d를 하는 와중에 미친척하고 모든 클래스분석 한번 해봅니다. 

package org.cocos2d.types; 

//! A 2D grid_ size

public class ccGridSize {

    public int x;

    public int y; 

    //! helper function to create a ccGridSize

    public static ccGridSize ccg(final int x, final int y) {

        return new ccGridSize(x, y);

    } 

    public ccGridSize(int x, int y) {

        this.x = x;

        this.y = y;

    } 

    public ccGridSize(ccGridSize gs) {

        this.x = gs.x;

        this.y = gs.y;

    }

}

그리드 사이즈를 위한 클래스 입니다. 
별다른거없고
가로 세로 크기 지정으로 위해서 int 로 값을 만든것뿐이네요

생성 예)
CCGridSize gs = CCGridSize.ccg(4,5); 
입니다.