首次提交
This commit is contained in:
@@ -0,0 +1,193 @@
|
||||
using System.Collections.Generic;
|
||||
using DG.Tweening;
|
||||
using FairyGUI;
|
||||
using BingoBrain;
|
||||
using BingoBrain.Core;
|
||||
using BingoBrain.HotFix;
|
||||
using UnityEngine;
|
||||
|
||||
public static class BingoCell
|
||||
{
|
||||
public static Transform root;
|
||||
|
||||
public static int bingoCount = 5;
|
||||
|
||||
public static int FixedNum = 12;
|
||||
|
||||
public static List<Tween> tweens = new List<Tween>();
|
||||
|
||||
public static List<int> FixedCallIndexList = new List<int>
|
||||
{
|
||||
0, 6, 24, 18, 15, 5, 4, 10, 20
|
||||
};
|
||||
|
||||
public static bool isFirstGame;
|
||||
|
||||
public static Vector2 CenterUIPos
|
||||
{
|
||||
get
|
||||
{
|
||||
Vector2 size = GRoot.inst.size / 2;
|
||||
return new Vector2(size.x, size.y);
|
||||
}
|
||||
}
|
||||
|
||||
public static bool IsPauseGame => PauseSum > 0;
|
||||
|
||||
public static bool IsGuiding => false;
|
||||
|
||||
public static bool IsInGame = false;
|
||||
|
||||
public static bool isVictory = false;
|
||||
|
||||
public static int PauseSum;
|
||||
|
||||
public static bool isProcedure;
|
||||
|
||||
#region 叫号逻辑
|
||||
|
||||
public static int MaxAddCallSum;
|
||||
|
||||
public static int AddCallSum;
|
||||
|
||||
public static int MaxCallSum;
|
||||
|
||||
private static int callSpeed = 1;
|
||||
|
||||
public static bool isGameOver = false;
|
||||
|
||||
public static int CallSpeed
|
||||
{
|
||||
get => callSpeed;
|
||||
set
|
||||
{
|
||||
callSpeed = value;
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.CallSpeedChange, callSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Bingo逻辑
|
||||
|
||||
public static int CardBoardCount
|
||||
{
|
||||
get
|
||||
{
|
||||
if (PreferencesMgr.Instance.CardBoardIndex < 0 || PreferencesMgr.Instance.CardBoardIndex > 2)
|
||||
{
|
||||
PreferencesMgr.Instance.CardBoardIndex = 0;
|
||||
}
|
||||
|
||||
return cardBoardNumList[PreferencesMgr.Instance.CardBoardIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public static int MaxCoinCount
|
||||
{
|
||||
get { return GameHelper.GetCommonModel().Initialprop[1]; }
|
||||
}
|
||||
|
||||
public static int MinCoinCount
|
||||
{
|
||||
get { return GameHelper.GetCommonModel().Initialprop[0]; }
|
||||
}
|
||||
|
||||
public static int MaxCashCount
|
||||
{
|
||||
get { return GameHelper.GetCommonModel().Initialprop[3]; }
|
||||
}
|
||||
|
||||
public static int MinCashCount
|
||||
{
|
||||
get { return GameHelper.GetCommonModel().Initialprop[2]; }
|
||||
}
|
||||
|
||||
#region 能量道具
|
||||
|
||||
public static int curEnergy;
|
||||
|
||||
public static float EnergyPrg
|
||||
{
|
||||
get { return BingoCell.curEnergy * 1F / BingoCell.FullEnergy; }
|
||||
}
|
||||
|
||||
public static int FullEnergy
|
||||
{
|
||||
get { return GameHelper.GetCommonModel().Activateprop[PreferencesMgr.Instance.CardBoardIndex]; }
|
||||
}
|
||||
|
||||
public static bool IsFullEnergy
|
||||
{
|
||||
get { return curEnergy == FullEnergy; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public static List<CardBoardEntity> cardBoardList = new List<CardBoardEntity>();
|
||||
|
||||
public static Dictionary<int, List<int>> bingoDic = new Dictionary<int, List<int>>();
|
||||
|
||||
public static List<int> calledList = new List<int>();
|
||||
|
||||
private static int[] cardBoardNumList = new[]
|
||||
{
|
||||
1, 2, 4
|
||||
};
|
||||
|
||||
public static bool isCallFinish;
|
||||
|
||||
public static bool isPropRewarding;
|
||||
|
||||
public static int bingoCardboardIndex = -1;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 卡牌
|
||||
|
||||
public static int KeyCardSum { get; set; }
|
||||
|
||||
public static void AddKeyCardSum(int sum)
|
||||
{
|
||||
KeyCardSum += sum;
|
||||
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.KeyCardSumChane);
|
||||
}
|
||||
|
||||
public static void OpenActivityUI(object o = null)
|
||||
{
|
||||
KeyCardSum -= 3;
|
||||
|
||||
GameDispatcher.Instance.Dispatch(BingoInfo.KeyCardSumChane);
|
||||
UICtrlDispatcher.Instance.Dispatch(SkinInfo.BingoCardUI_Open);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 奖励
|
||||
|
||||
public static decimal GetCoinSum;
|
||||
|
||||
public static decimal GetCashSum;
|
||||
|
||||
public static void AddReadSum(int id, decimal Sum)
|
||||
{
|
||||
if (id == 101)
|
||||
{
|
||||
GetCoinSum += Sum;
|
||||
}
|
||||
|
||||
if (id == 102)
|
||||
{
|
||||
GetCashSum += Sum;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 道具系统
|
||||
|
||||
public static Vector3 propOriginPos;
|
||||
|
||||
#endregion
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 988c7d7380e54d2592b9d4641552cc17
|
||||
timeCreated: 1699945443
|
||||
@@ -0,0 +1,11 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class CardBoardData
|
||||
{
|
||||
public int index;
|
||||
public List<int> cardNumList = new();
|
||||
public List<int> selectList = new();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 171160b018dd4ca1ba8143f6b279e4f6
|
||||
timeCreated: 1699945675
|
||||
@@ -0,0 +1,23 @@
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class CardData
|
||||
{
|
||||
public int index;
|
||||
public CardBoardEntity cardBoard;
|
||||
public int num;
|
||||
public bool isDelaySelect;
|
||||
public bool isSelect;
|
||||
public bool isCoin;
|
||||
public CardPropType type;
|
||||
}
|
||||
|
||||
public enum CardPropType
|
||||
{
|
||||
none=-1,
|
||||
coin,
|
||||
coinx3,
|
||||
cash,
|
||||
cashx3,
|
||||
fanpai,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 374e9c67c5ee4b1ba0fa6c590aeb92d1
|
||||
timeCreated: 1699945714
|
||||
@@ -0,0 +1,74 @@
|
||||
|
||||
|
||||
using System;
|
||||
using FairyGUI;
|
||||
using BingoBrain.Core;
|
||||
using UnityEngine;
|
||||
|
||||
namespace BingoBrain
|
||||
{
|
||||
public class RewardedVal
|
||||
{
|
||||
private static Jcna<RewardedVal> _pool = new Jcna<RewardedVal>();
|
||||
public static RewardedVal Get(int id, double sum)
|
||||
{
|
||||
return Get(id,sum,null);
|
||||
}
|
||||
public static RewardedVal Get(int id, double sum,Action<bool> finish)
|
||||
{
|
||||
return Get(id,sum, GRoot.inst.size / 2,finish);
|
||||
}
|
||||
|
||||
public static RewardedVal Get(int id, double sum,Vector2 pot,Action<bool> finish=null)
|
||||
{
|
||||
RewardedVal val = _pool.Get();
|
||||
val.Id = id;
|
||||
val.Sum = sum;
|
||||
val.StartPot = pot;
|
||||
val.IsPlayAudio = true;
|
||||
val.IsAddReadSum = true;
|
||||
val.onfinish = finish;
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
public void Release()
|
||||
{
|
||||
Id = 0;
|
||||
Sum = 0;
|
||||
onfinish = null;
|
||||
IsMulti = false;
|
||||
cont_index = -1;
|
||||
IsPlayAudio = true;
|
||||
StartPot = GRoot.inst.size / 2;
|
||||
_pool.Release(this);
|
||||
}
|
||||
|
||||
public RewardedVal()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public Action<bool> onfinish;
|
||||
public Action<bool> onResult;
|
||||
|
||||
public int Id { get; set; }
|
||||
public double Sum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否翻倍
|
||||
/// </summary>
|
||||
public bool IsMulti { get; set; }
|
||||
/// <summary>
|
||||
/// 索引index
|
||||
/// </summary>
|
||||
public int cont_index { get; set; }
|
||||
|
||||
public Vector2 StartPot;
|
||||
|
||||
public bool IsPlayAudio=true;
|
||||
|
||||
public bool IsAddReadSum = true;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d51d66b3d5b4fb482263351575f9e22
|
||||
timeCreated: 1699949510
|
||||
Reference in New Issue
Block a user