This commit is contained in:
舒荣森 2024-10-30 23:18:31 +08:00
parent eb2b4211cd
commit 1df706fa79
10 changed files with 183 additions and 10 deletions

View File

@ -1646,6 +1646,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 618926457}
- component: {fileID: 618926458}
m_Layer: 0
m_Name: demine01
m_TagString: Untagged
@ -1670,6 +1671,32 @@ Transform:
m_Father: {fileID: 1077006413}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!61 &618926458
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 618926456}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 0
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0.055420995, y: 0.20321131}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 0, y: 0}
newSize: {x: 0, y: 0}
adaptiveTilingThreshold: 0
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1.9975827, y: 1.4064226}
m_EdgeRadius: 0
--- !u!1 &638771785
GameObject:
m_ObjectHideFlags: 0

View File

@ -0,0 +1,44 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[Serializable]
public class RootObject
{
public List<Item> List;
public int ErrorCode;
public string ErrorMessage;
}
[Serializable]
public class Item
{
public int Id;
public int Num;
public string Name;
public int ActivateValue;
public int StoreValue;
public float Yield;
public int Limit;
public int EndureTime;
public List<float> ReferrerBouns;
public string CreateDateTime;
}
public class JinShaBuy : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

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

View File

@ -119,7 +119,7 @@ public class Logo_in : mount
GameObject.Destroy(this.gameObject);
}
}

View File

@ -0,0 +1,37 @@
using DG.Tweening;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System;
using DG.Tweening;
public class LanbaoshiBtn : MonoBehaviour
{
public static Action OnSceneMouseBTN;
// Start is called before the first frame update
void Start()
{
OnSceneMouseBTN += JUmpScem;
}
private void OnMouseDown()
{
//SceneManager.LoadScene(JumpScene.cultivation_Jinsha_mine_slices);
transform.DOScale(new Vector3(0.5f, 0.5f, 0.5f), 0.3f).SetEase(Ease.OutBack);
StartCoroutine("Magnify");
}
IEnumerator Magnify()
{
transform.DOScale(Vector3.one, 0.5f).SetEase(Ease.OutBack);
OnSceneMouseBTN();
return null;
}
void JUmpScem()
{
Debug.Log("====");
SceneGuodu.instance.SlideInAndLoadScene(JumpScene.cultivation_diamond_mines_slices);
}
}

View File

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

View File

@ -33,6 +33,7 @@ public class JumpScene
public const string signin= "signin";
public const string upLevel_Scene= "upLevel_Scene";
public const string EcoTree = "EcoTree";
public const string cultivation_diamond_mines_slices = "cultivation_diamond_mines_slices";
// Start is called before the first frame update

View File

@ -80,4 +80,21 @@ public class PlayerManager
break;
}
}
}
public float GetNumer(MoneyType type)
{
switch (type)
{
case MoneyType.Stones:
return Stones;
case MoneyType.Forging:
return Forging;
case MoneyType.Coins:
return Coins;
case MoneyType.Ore:
return Ore;
}
return 0;
}
}

View File

@ -33,7 +33,7 @@ public class room : MonoBehaviour
haveNumber = 10;
}
ChangeTextPro();
}
private void OnEnable()
@ -67,6 +67,7 @@ public class room : MonoBehaviour
if (toolsNumber_text == null)
{
GetRoom();
PlayerManager.Instance.SetMoney(MoneyType.Stones, -10);
}
haveNumber--;
@ -97,10 +98,18 @@ public class room : MonoBehaviour
if (toolsNumber_text == null)
{
GetRoom();
Debug.Log("扣钱检测");
if (PlayerManager.Instance.GetNumer(MoneyType.Stones) < 11)
{
Promptmgr.Instance.PromptBubble("购买卷不足", Color.black, Color.red);
return;
}
PlayerManager.Instance.SetMoney(MoneyType.Stones, -10);
}
haveNumber--;
toolsNumber--;
toolsNumber--;
UpdateShowCazhi();
ChangeTextPro();
@ -132,6 +141,15 @@ public class room : MonoBehaviour
{
if (type == this.type)
{
Debug.Log("扣钱检测");
if (PlayerManager.Instance.GetNumer(MoneyType.Coins) < 11)
{
Promptmgr.Instance.PromptBubble("购买卷不足", Color.black, Color.red);
return;
}
PlayerManager.Instance.SetMoney(MoneyType.Coins, -10);
if ((startPos.childCount + haveNumber) > 9)
{
Promptmgr.Instance.PromptBubble("矿洞已满", Color.black, Color.red);
@ -142,11 +160,7 @@ public class room : MonoBehaviour
{
Promptmgr.Instance.PromptBubble("人数已满", Color.black, Color.red);
return;
}
Debug.Log("¿ÛÇ®¼ì²â");
}
haveNumber += num;
Promptmgr.Instance.PromptBubble("购买成功");
@ -161,6 +175,16 @@ public class room : MonoBehaviour
{
if (type == this.type+1)
{
Debug.Log("扣钱检测");
if (PlayerManager.Instance.GetNumer(MoneyType.Coins) < 11)
{
Promptmgr.Instance.PromptBubble("购买卷不足", Color.black, Color.red);
return;
}
PlayerManager.Instance.SetMoney(MoneyType.Coins, -10);
if ((startPos.childCount + toolsNumber) > 9)
{
Promptmgr.Instance.PromptBubble("矿洞已满", Color.black, Color.red);
@ -173,7 +197,7 @@ public class room : MonoBehaviour
return;
}
Debug.Log("¿ÛÇ®¼ì²â");
toolsNumber += 1;
Promptmgr.Instance.PromptBubble("购买成功");

View File

@ -83,6 +83,7 @@ public class landContorl : MonoBehaviour
//Debug.LogError("쇱꿎繫법");
//Debug.LogError("왱풀쭉서");
PlayerManager.Instance.SetMoney(MoneyType.Stones, -FishPrice);
fishMan = GameObject.Instantiate(fishManPrefab);
//fishMan.transform.SetParent(startPos);
fishMan.transform.position = startPos.position;