bingo b面修改

This commit is contained in:
2026-05-08 11:03:44 +08:00
parent ad5920ac6a
commit 5d32fd56f4
1780 changed files with 36187 additions and 73978 deletions
@@ -24,6 +24,17 @@ namespace BingoBrain
public int[] offset;
public int num;
}
public class ExchangeDesModel : BingoBrainConfigModel<ExchangeDescriptors>
{
}
public class ExchangeDescriptors : BingoBrainConfigData
{
public string des_key;
public string Mode_0;
public string Mode_1;
}
}
@@ -53,13 +53,13 @@ namespace BingoBrain
public int Activetimes;
public int rewardrate;
public int roomrewardrate;
public int Smallrewardsrate;
public int exchangeCD;
public float afSendLimit;
public float afSendNum;
public int Smallrewardsrate;
public int exchangeCD;
public float afSendLimit;
public float afSendNum;
public int rewardinsertion;
public int propswitch;
public int flyswitch;
public int RevivalCoins;
@@ -68,11 +68,11 @@ namespace BingoBrain
public float Passportgift2;
public float addspace;
public float addspace2;
public int []darkWVRefreshtime;
public int[] darkWVRefreshtime;
public int []darkWVDailyrefreshtimes;
public int[] darkWVDailyrefreshtimes;
public int WVswitch;
public int[] WVClickAddTime;
public int[] WVClickAddTime;
public int PassTimes;
public int FailedGiftProgress;
@@ -81,9 +81,18 @@ namespace BingoBrain
public int PiggyBankSwitch;
public int FailedGiftCD;
public int roomrate;
public int[] WVOffset;
public int[] darkWVRefreshtime2;
public float[] WVClickCTAddTime1;
public int[] WVOffset;
public int[] darkWVRefreshtime2;
public float[] WVClickCTAddTime1;
public float[] WVClickCTAddTime2;
//tixian
public int WwalaccelerationCD;
public int ExpiryUnlock;
public int BalanceExpired;
public int[] BalanceExchange;
public int[] PotExchange;
public int ExchangeModeToggle;
public int ExchangeProcessMode;
public int CHProcessMode;
}
}
@@ -1,248 +0,0 @@
using System;
using System.Collections.Generic;
using Spine.Unity;
using UnityEngine;
using BingoBrain;
using BingoBrain;
using BingoBrain.Core;
public class CreatAnimalCard : MonoBehaviour
{
private GameObject card_item;
public static CreatAnimalCard instance;
private List<Sprite> img_list;
public Camera orthoCamera; // 这个变量应该被设置为您想要调整大小的正交相机
private void Awake()
{
instance = this;
card_item = Resources.Load<GameObject>("card/card_item/card_");
img_list = new List<Sprite>();
// img_list = Resources.LoadAll<Sprite>("card/card_sprite").ToList();
// img_list.Sort((x, y) => String.Compare(x.name, y.name));
for (int i = 0; i < 16; i++)
{
img_list.Add(Resources.Load<Sprite>("card/card_sprite/" + i));
}
orthoCamera = GameObject.Find("GameCamera").GetComponent<Camera>();
float size = (float)Math.Round(28.125f / ((float)Screen.width / Screen.height), 4);
string type = SystemInfo.deviceModel.ToLower().Trim();
// Debug.Log($"type==========={type}");
if(type.Substring(0, 3) == "ipa"){//iPad机型
size = 49.9f;
}
orthoCamera.orthographicSize = size;
}
// Start is called before the first frame update
public List<List<Card_item>> card_item_list = new List<List<Card_item>>();
public List<List<Card_item>> CreatCardNew(int all_card_numbers, int card_type_max, int card_layer, int extra_max, List<List<Vector2>> map_list, List<Vector2> left_extra_list,
List<Vector2> right_extra_list)
{
//all_card_numbers *= 3;
int money_rate = ConfigSystem.GetConfig<CommonModel>().rewardrate;
List<int> type_list = new List<int>();
List<int> this_timetype_list = new List<int>();
// Debug.Log(card_layer);
card_item_list.Clear();
// if (card_layer < extra_max)
// {
// card_layer = extra_max;
// }
for (int i = 0; i < all_card_numbers; i++)
{
int type = 0;
if (GameHelper.IsGiftSwitch() && UnityEngine.Random.Range(0, 100) < money_rate) type = 15;
else type = UnityEngine.Random.Range(0, card_type_max);
// Debug.Log($"type_list.type==========={type}");
type_list.Add(type);
type_list.Add(type);
type_list.Add(type);
if (!this_timetype_list.Contains(type)) this_timetype_list.Add(type);
}
SaveData.GetSaveobject().this_time_cardtype = this_timetype_list.Count;
for (int i = 0; i < card_layer; i++)
{
card_item_list.Add(new List<Card_item>());
}
if (left_extra_list.Count > 0 || right_extra_list.Count > 0)
{
for (int i = 0; i < left_extra_list.Count; i++)
{
Card_item _tempObject = new()
{
pos_x = left_extra_list[i].x,
pos_y = left_extra_list[i].y,
_layer = i
};
card_item_list[i].Add(_tempObject);
}
for (int i = 0; i < right_extra_list.Count; i++)
{
Card_item _tempObject1 = new()
{
pos_x = right_extra_list[i].x,
pos_y = right_extra_list[i].y,
_layer = i
};
card_item_list[i].Add(_tempObject1);
}
}
var nums = 0;
for (int i = 0; i < map_list.Count; i++)
{
nums += map_list[i].Count;
}
for (int i = 0; i < nums; i++)
{
Card_item _tempObject = new();
int layer = getMaplayer(map_list);//确定层数
int pos = UnityEngine.Random.Range(0, map_list[layer].Count);
_tempObject.pos_x = map_list[layer][pos].x;
_tempObject.pos_y = map_list[layer][pos].y;
_tempObject._layer = layer;
card_item_list[layer].Add(_tempObject);
map_list[layer].RemoveAt(pos);
}
for (int i = 0; i < card_item_list.Count; i++)
{
card_item_list[i].Sort((x, y) => y.pos_y.CompareTo(x.pos_y));
}
int index = 0;
for (int i = 0; i < card_item_list.Count; i++)
{
float z_offset = 0;//用来微调每层之间的z值,让下层盖住上层
float last_posy = 0;
for (int j = 0; j < card_item_list[i].Count; j++)
{
if (last_posy != card_item_list[i][j].pos_y)
{
z_offset += 0.05f;
last_posy = card_item_list[i][j].pos_y;
}
GameObject temp = Instantiate(card_item, new Vector3(card_item_list[i][j].pos_x, card_item_list[i][j].pos_y, 400 - card_item_list[i][j]._layer - z_offset), Quaternion.identity, gameObject.transform);
// Debug.Log($"type_list.Count==========={type_list.Count}");
index = UnityEngine.Random.Range(0, type_list.Count);
temp.GetComponent<SpriteRenderer>().sprite = img_list[type_list[index]];
// Debug.Log(temp.GetComponent<SpriteRenderer>().sprite.bounds.size.x);
// Debug.Log(temp.GetComponent<SpriteRenderer>().sprite.bounds.size.y);
card_item_list[i][j].sheep_card = temp;
card_item_list[i][j].card_type = type_list[index];
temp.gameObject.name = i + "-" + j;
type_list.RemoveAt(index);
}
}
return card_item_list;
}
public void creatSaveCard(List<List<Card_item>> card_item_list)
{
this.card_item_list = card_item_list;
for (int i = 0; i < card_item_list.Count; i++)
{
for (int j = 0; j < card_item_list[i].Count; j++)
{
GameObject temp;
// if (card_item_list[i][j].is_out)
// {
// temp = Instantiate(card_item, new Vector3(card_item_list[i][j].pos_x, card_item_list[i][j].pos_y, 400 - card_item_list[i][j].out_layer), Quaternion.identity, gameObject.transform);
// }
// else
temp = Instantiate(card_item, new Vector3(card_item_list[i][j].pos_x, card_item_list[i][j].pos_y, 400 - card_item_list[i][j]._layer), Quaternion.identity, gameObject.transform);
temp.GetComponent<SpriteRenderer>().sprite = img_list[card_item_list[i][j].card_type];
card_item_list[i][j].sheep_card = temp;
if (card_item_list[i][j].in_slot || card_item_list[i][j].is_out) temp.transform.localScale = new Vector3(SheepPlayUI.card_slot_scale, SheepPlayUI.card_slot_scale, 1);
temp.gameObject.name = i + "-" + j;
}
}
}
private GameObject Popup;
#if UNITY_EDITOR || UNITY_IOS
void Update()
{
if (Input.GetMouseButtonDown(0))
{
if (Popup == null) Popup = GameObject.Find("Popup");
if (Popup.transform.childCount != 0) return;
Ray ray = orthoCamera.ScreenPointToRay(Input.mousePosition);
RaycastHit hit;
int layerMask = 1 << 6; // 只与第8层的碰撞器碰撞
// 如果射线与layerMask指定层的碰撞器发生碰撞
if (Physics.Raycast(ray, out hit, Mathf.Infinity, layerMask))
{
Debug.Log("Hit " + hit.collider.gameObject.name);
GameDispatcher.Instance.Dispatch(GameMsg.card_click, hit.collider.gameObject.name);
// 在此处添加点击物体后的逻辑
}
else
{
Debug.Log("No hit");
}
}
}
#endif
private GameObject disappear01;
private GameObject disappear02;
public void creatSpine(int type, Vector3 vec3)
{
if (disappear01 == null) disappear01 = Resources.Load<GameObject>("card/bg_img/fx_disaappear_1");
if (disappear02 == null) disappear02 = Resources.Load<GameObject>("card/bg_img/fx_disaappear_2");
if (type == 1)
{
SkeletonAnimation temp = Instantiate(disappear01, new Vector3(vec3.x, vec3.y, 110), Quaternion.identity, gameObject.transform).GetComponent<SkeletonAnimation>();
temp.AnimationState.SetAnimation(0, "disappear01", true);
temp.AnimationState.Complete += (trackEntry) =>
{
Destroy(temp.gameObject);
};
}
if (type == 2)
{
SkeletonAnimation temp = Instantiate(disappear02, new Vector3(vec3.x, vec3.y, 110), Quaternion.identity, gameObject.transform).GetComponent<SkeletonAnimation>();
temp.AnimationState.SetAnimation(0, "disappear02", true);
temp.AnimationState.Complete += (trackEntry) =>
{
Destroy(temp.gameObject);
};
}
// temp.GetComponent<SpriteRenderer>().sprite = img_list[card_item_list[i][j].card_type];
}
int getMaplayer(List<List<Vector2>> map_list)
{
int layer = UnityEngine.Random.Range(0, map_list.Count);//确定层数
if (map_list[layer].Count == 0)
{
layer = getMaplayer(map_list);
}
return layer;
}
}
@@ -1,11 +0,0 @@
fileFormatVersion: 2
guid: afff9374e713d4f3fb16d174ad8becac
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
@@ -180,7 +180,7 @@ namespace BingoBrain
if (gameObjTransform != null)
{
gameObjTransform.localPosition = originPos + new Vector3(index / BingoCell.bingoCount * offset,
index % BingoCell.bingoCount * -offset);
index % BingoCell.bingoCount * -(offset + 0.02f));
}
else
{
@@ -465,10 +465,10 @@ namespace BingoBrain
public int IsBingo(List<int> selectList)
{
foreach (var kv in from kv in BingoCell.bingoDic
where !bingoedList.Contains(kv.Key)
let isAllMatch = kv.Value.All(selectList.Contains)
where isAllMatch
select kv)
where !bingoedList.Contains(kv.Key)
let isAllMatch = kv.Value.All(selectList.Contains)
where isAllMatch
select kv)
{
return kv.Key;
}
+10 -10
View File
@@ -6,7 +6,7 @@ using TMPro;
using UnityEngine;
using UnityEngine.EventSystems;
using Spine;
using UnityEngine.UI;
namespace BingoBrain
{
public class CardEntity
@@ -14,7 +14,7 @@ namespace BingoBrain
public CardData data = new CardData();
public GameCell Game = new GameCell();
private TextMeshPro text;
private TextMeshPro alphaNum;
private SpriteRenderer alphaNum;
private GameObject selectStar;
private GameObject coin;
@@ -34,24 +34,24 @@ namespace BingoBrain
selectStar = Game.transform.Find("selectStar").gameObject;
reward = Game.transform.Find("reward");
coin = Game.transform.Find("coin").gameObject;
alphaNum = text.transform.GetChild(0).GetComponent<TextMeshPro>();
alphaNum = text.transform.GetChild(0).GetComponent<SpriteRenderer>();
Game.transform.localScale = Vector3.one * 1.04f;
TriggerBingo.Get(Game.gameObject).onClick = OnClick;
alphaNum.alpha = 0;
alphaNum.color = new Color(1f, 1f, 1f, 0f);
action?.Invoke();
});
}
else
{
alphaNum.alpha = 0;
alphaNum.color = new Color(1f, 1f, 1f, 0f);
action?.Invoke();
}
}
public void SetByData()
{
alphaNum.text = text.text = GameHelper.GetNum(data.num);
// alphaNum.text = text.text = GameHelper.GetNum(data.num);
text.text = GameHelper.GetNum(data.num);
if (data.cardBoard.data.selectList.Contains(data.index))
{
data.isSelect = true;
@@ -96,7 +96,7 @@ namespace BingoBrain
alphaTween?.Pause();
delayedCall?.Kill();
delayedCall = null;
alphaNum.alpha = 0;
alphaNum.color = new Color(1f, 1f, 1f, 0f);
data.cardBoard.isFinish = false;
data.cardBoard.isBingoing = false;
data.isSelect = false;
@@ -164,7 +164,7 @@ namespace BingoBrain
}
alphaTween?.Pause();
alphaNum.alpha = 0;
alphaNum.color = new Color(1f, 1f, 1f, 0f);
var effect = Battle.Instance.ShungTik.Get("Effect.spark.fx_number_enter", "fx_number_enter");
effect.transform.SetParent(Game.transform, false);
DOVirtual.DelayedCall(1, () => { ReleaseEffect(effect); }).SetAutoKill();
@@ -212,7 +212,7 @@ namespace BingoBrain
case CardPropType.cashx3:
rewardSingleData.id = 102;
rewardData.AddReward(rewardSingleData);
if (GameHelper.IsGiftSwitch()) UICtrlDispatcher.Instance.Dispatch(SkinInfo.StarRewardUI_Open,true);
if (GameHelper.IsGiftSwitch()) UICtrlDispatcher.Instance.Dispatch(SkinInfo.StarRewardUI_Open, true);
else GameDispatcher.Instance.Dispatch(BingoInfo.GetReward, rewardData);
break;
case CardPropType.fanpai:
@@ -283,8 +283,8 @@ namespace BingoBrain
public int h5StayTime;
public decimal makeupTaskH5Time;
public List<MakeupTaskData> makeupTaskHistory;
public List<MakeupTaskData> coinMakeupTaskHistory;
public List<MakeupTaskData> makeupTaskHistory;
public List<MakeupTaskData> coinMakeupTaskHistory;
public decimal coinMakeupTaskH5Time;
}
}
+3 -1
View File
@@ -65,10 +65,12 @@ namespace BingoBrain.HotFix
public static uint H5ViewClickBtn = ++Cursor_BASE;
public static uint showBroadCast = ++Cursor_BASE;
public static uint hideBroadCast = ++Cursor_BASE;
public static uint resurgence = ++Cursor_BASE;
public static uint resurgence = ++Cursor_BASE;
public static uint resurgence_close = ++Cursor_BASE;
public static uint RefreshSaveingPot = ++Cursor_BASE;
public static uint updateRecordList = ++Cursor_BASE;
public static uint Network_reconnection = ++Cursor_BASE;
public static uint MakeUpConfirmUIClosed = ++Cursor_BASE;
}
}
@@ -127,6 +127,10 @@ namespace BingoBrain
public static uint SettingUI_Close = ++cursor_OpenClose;
public static uint RegulationUI_Open = ++cursor_OpenClose;
public static uint RegulationUI_Close = ++cursor_OpenClose;
public static uint SaveingPotUI_Open = ++cursor_OpenClose;
public static uint SaveingPotUI_Close = ++cursor_OpenClose;
public static uint RecordViewUI_Open = ++cursor_OpenClose;
public static uint RecordViewUI_Close = ++cursor_OpenClose;
}
public static partial class UICtrlMsg
{