Compare commits

...

3 Commits

10 changed files with 3716 additions and 36 deletions

View File

@ -898,19 +898,6 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 1125018133084166437, guid: 4d328a61046e1d2498391895fd2c11d7, type: 3}
m_PrefabInstance: {fileID: 107147069}
m_PrefabAsset: {fileID: 0}
--- !u!114 &934962577
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 934962570}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0302e7dfe12577a4198abcaca8c0284b, type: 3}
m_Name:
m_EditorClassIdentifier:
globalFrameRate: 100
--- !u!1 &1091198944
GameObject:
m_ObjectHideFlags: 0
@ -1126,7 +1113,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 0302e7dfe12577a4198abcaca8c0284b, type: 3}
m_Name:
m_EditorClassIdentifier:
globalFrameRate: 100
globalFrameRate: 60
--- !u!1 &1348751385
GameObject:
m_ObjectHideFlags: 0

File diff suppressed because it is too large Load Diff

View File

@ -4,7 +4,7 @@ using UnityEngine;
public class FrameRateManager : MonoBehaviour
{
public float globalFrameRate = 100f; // 设置的目标帧率
public float globalFrameRate = 60; // 设置的目标帧率
void Start()
{

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

@ -0,0 +1,123 @@
fileFormatVersion: 2
guid: fe7509c45a2530e489db5ded458a6703
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 0
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Android
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@ -47,6 +47,7 @@ public class BaoshiRoomcontroller : MonoBehaviour
public int shipNumber;
public int MaxShipNumber=10;
[Header("显示购买价格")] public Text price;
public int ShipNumber
{
get=> shipNumber;

View File

@ -1,5 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using Unity.VisualScripting;
using UnityEngine;
using UnityEngine.UI;
public class Lottery : MonoBehaviour
@ -9,16 +10,25 @@ public class Lottery : MonoBehaviour
public GameObject petItem;
public Transform Connect;
public Text WaterText;
public List<Sprite> petsp = new List<Sprite>();
public List<PetFightingBtn> fightinglist = new List<PetFightingBtn>();
public Button ClosefightingBtn;
public List<GameObject> objitem = new List<GameObject>();
async void OnEnable()
{
TreeInfo info = await Scene_main_jiekou.instance.TreeInfoS();
WaterText.text = info.Data.Water.ToString();
}
async void Start()
{
LotteryBtn.onClick.AddListener(LotteryClick);
ClosefightingBtn.onClick.AddListener(CloseBtnClick);
Update_itemClick();
}
public void CloseBtnClick()//隐藏所有展示item的btn
@ -35,12 +45,14 @@ public class Lottery : MonoBehaviour
for (int i = 0; i < info.data.items.Count; i++)//给宠物卡片的item传输id名字头像以及将动态生成的卡片的隐藏的方法传过去
{
GameObject obj = GameObject.Instantiate(petItem, Connect);
objitem.Add(obj);
obj.GetComponent<PetCard>().petName.text = info.data.items[i].name;
obj.GetComponent<PetCard>().petFightingBtn.id = info.data.items[i].id;
obj.GetComponent<PetCard>().petimage.sprite = showSprite(info.data.items[i].name);
obj.GetComponent<PetCard>().petFightingBtn.lottery = this;
fightinglist.Add(obj.GetComponent<PetCard>().petFightingBtn);
}
}
Sprite showSprite(string n)
@ -94,10 +106,16 @@ public class Lottery : MonoBehaviour
PetAdoptResponse response = await Scene_main_jiekou.instance.PetAdopts();
if (response.code == 200)
{
foreach (GameObject ob in objitem)
{
Destroy(ob);
}
objitem.Clear();
fightinglist.Clear();
Update_itemClick();
TreeInfo info = await Scene_main_jiekou.instance.TreeInfoS();
WaterText.text = info.Data.Water.ToString();
WaterPanel.instance.Updated_water(info);
Debug.Log(response);
}
else

View File

@ -28,7 +28,7 @@ public class Scene_baoshikuang : MonoBehaviour
foreach (MinngConfigData info in infos)
{
BaoshiRoomcontroller go = lands[index].GetComponent<BaoshiRoomcontroller>();
go.price.text = info.price.ToString();
go.RoomId = info.id;
//info.activate_count
//info.activate_limit

View File

@ -0,0 +1,96 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class ShopScroll : MonoBehaviour
{
public Button GemBtn;
public Button oreBtn;
public Button lingpaiBtn;
public Button mengyaoBtn;
public Button skinBtn;
public GameObject Gemscroll;
public GameObject OreScroll;
public GameObject lingpaiScroll;
public GameObject MengyaoScroll;
public GameObject SkinScroll;
public Image gemmage;
public Image oreImage;
public Image lingpaiImage;
public Image mengyaoImage;
public Image skinImage;
public Sprite Checked;
public Sprite Unchecked;
void Start()
{
GemBtn.onClick.AddListener(gemclick);
oreBtn.onClick.AddListener(oreclick);
lingpaiBtn.onClick.AddListener(lingpaiClick);
mengyaoBtn.onClick.AddListener(mengyaoClick);
skinBtn.onClick.AddListener(skinClick);
}
void gemclick()
{
HideScroll();
gemmage.sprite = Checked;
Gemscroll.gameObject.SetActive(true);
}
void oreclick()
{
HideScroll();
oreImage.sprite = Checked;
OreScroll.gameObject.SetActive(true);
}
void lingpaiClick()
{
HideScroll();
lingpaiImage.sprite = Checked;
lingpaiScroll.gameObject.SetActive(true);
}
void mengyaoClick()
{
HideScroll();
mengyaoImage.sprite = Checked;
MengyaoScroll.gameObject.SetActive(true);
}
void skinClick()
{
HideScroll();
skinImage.sprite = Checked;
SkinScroll.gameObject.SetActive(true);
}
void HideScroll()
{
Gemscroll.gameObject.SetActive(false);
OreScroll.gameObject.SetActive(false);
lingpaiScroll.gameObject.SetActive(false);
MengyaoScroll.gameObject.SetActive(false);
SkinScroll.gameObject.SetActive(false);
gemmage.sprite = Unchecked;
oreImage.sprite = Unchecked;
lingpaiImage.sprite = Unchecked;
mengyaoImage.sprite = Unchecked;
skinImage.sprite = Unchecked;
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 7c777c78b13e42745826a3031f51bf26
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: