Exemple #1
0
    public override void handleInput(GameInputEvent inputevent, int configidx)
    {
        Debug.Log(inputevent);
        GameStateMove move = _mainGame.GetComponent <GameStateMove>();

        move._curInputEvent = inputevent;
        move._moveConfig    = configidx;
        _mainGame.GetComponent <MainGame>().changeStage(MainGame.GameStage.MOVE);
    }
Exemple #2
0
    void Awake()
    {
        _newBlcokDur     = 0.5f;
        _creatTargetTime = Time.time + _newBlcokDur;

        _arrAllBlock   = new List <GameObject>();
        _arrSpriteIcon = new GameObject[GameConfig.GAMECOLUMN, GameConfig.GAMEROW];

        _curGameStage  = GameStage.NOR;
        _norGameState  = gameObject.AddComponent <GameStateNor>();
        _moveGameState = gameObject.AddComponent <GameStateMove>();

        _speedValue       = GameConfig.SPEED_DOWN;
        _protectInputTime = 0.0f;
        _blockSize        = new Vector2(GameConfig.TROZEI_SIZE, GameConfig.TROZEI_SIZE);
        GetComponent <Camera>().orthographicSize = 320 / GetComponent <Camera>().aspect;
        Debug.Log("size:" + GetComponent <Camera>().orthographicSize);
        GetComponent <Camera>().transform.position = new Vector3(320, GetComponent <Camera>().orthographicSize, -10);
        //GetComponent<Camera>().
        Debug.Log("awark:" + _arrWidth);

        _arrNeedDelList = new List <WaitingForDelStruct>();
    }