public MapTile GetNearbMapTile(eTileDir dir) { switch (dir) { case eTileDir.Top: return(_tileT); case eTileDir.LeftTop: return(_tileLT); case eTileDir.RightTop: return(_tileRT); case eTileDir.LeftBottom: return(_tileLB); case eTileDir.RightBottom: return(_tileRB); case eTileDir.Bottom: return(_tileB); default: return(null); } }
public void __Gen_Delegate_Imp12(object p0, eBubbleType p1, eTileDir p2, ref int p3) { #if THREAD_SAFE || HOTFIX_ENABLE lock (luaEnv.luaEnvLock) { #endif RealStatePtr L = luaEnv.rawL; int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); ObjectTranslator translator = luaEnv.translator; translator.PushAny(L, p0); translator.Push(L, p1); translator.Push(L, p2); LuaAPI.xlua_pushinteger(L, p3); PCall(L, 4, 1, errFunc); p3 = LuaAPI.xlua_tointeger(L, errFunc + 1); LuaAPI.lua_settop(L, errFunc - 1); #if THREAD_SAFE || HOTFIX_ENABLE } #endif }
public void CheckChainBomb(eBubbleType bubbleType, eTileDir dir, ref int chainCount) { if (bubbleType == BubbleType) { chainCount++; MapTile tile = _targetMapTile.GetNearbMapTile(dir); if (tile != null && tile.TargetBubble != null) { tile.TargetBubble.CheckChainBomb(bubbleType, dir, ref chainCount); } _chainBombArry[(int)dir] = chainCount; _chainBombArry[((int)dir + (int)eTileDir.Bottom) % (int)(eTileDir.LeftTop + 1)] = chainCount; } //if (_chainBombArry[(int)eTileDir.LeftBottom] >= GameManager.Instance.MatchBubbleCount || // _chainBombArry[(int)eTileDir.RightBottom] >= GameManager.Instance.MatchBubbleCount || // _chainBombArry[(int)eTileDir.Bottom] >= GameManager.Instance.MatchBubbleCount) if (_chainBombArry[(int)eTileDir.LeftBottom] >= MatchBubbleCount || _chainBombArry[(int)eTileDir.RightBottom] >= MatchBubbleCount || _chainBombArry[(int)eTileDir.Bottom] >= MatchBubbleCount) { transform.localScale = new Vector3(1.2f, 1.2f, 1f); IsBomb = true; } else { transform.localScale = Vector3.one; IsBomb = false; } }
void CalcBubbleBomb(eTileDir dir) { if (_chainBombArry[(int)dir] == 0) { MapTile lbTile = _targetMapTile.GetNearbMapTile(dir); if (lbTile != null && lbTile.TargetBubble != null) { _chainBombArry[(int)dir]++; lbTile.TargetBubble.CheckChainBomb(BubbleType, dir, ref _chainBombArry[(int)dir]); } } }
public void __Gen_Delegate_Imp11(object p0, eTileDir p1) { #if THREAD_SAFE || HOTFIX_ENABLE lock (luaEnv.luaEnvLock) { #endif RealStatePtr L = luaEnv.rawL; int errFunc = LuaAPI.pcall_prepare(L, errorFuncRef, luaReference); ObjectTranslator translator = luaEnv.translator; translator.PushAny(L, p0); translator.Push(L, p1); PCall(L, 2, 0, errFunc); LuaAPI.lua_settop(L, errFunc - 1); #if THREAD_SAFE || HOTFIX_ENABLE } #endif }
public int GetChainBombCount(eTileDir dir) { return(_chainBombArry[(int)dir]); }