Compare commits

...

3 Commits

Author SHA1 Message Date
GL
b8c82e6612 add 2024-11-13 18:01:18 +08:00
GL
7b466a0987 Merge branch 'main' of http://sheziwanglo.cn:3000/hyskai/_TheStrongestSnail 2024-11-13 12:07:15 +08:00
GL
561709b3c9 add 2024-11-13 12:07:04 +08:00
22 changed files with 1585 additions and 70 deletions

View File

@ -1,5 +1,105 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1101 &-7934733917320206733
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: State
m_EventTreshold: 1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -1701036716963345556}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.7222222
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-5960863943501419562
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: State
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -2708652100068900557}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.7222222
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-5934605492820383976
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: State
m_EventTreshold: 2
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6137305484940752271}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.7222222
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &-5234480481874143179
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: State
m_EventTreshold: 2
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 6137305484940752271}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.7222222
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &-2708652100068900557
AnimatorState:
serializedVersion: 6
@ -10,7 +110,9 @@ AnimatorState:
m_Name: Boos_Stand_1
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_Transitions:
- {fileID: -7934733917320206733}
- {fileID: -5934605492820383976}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@ -36,7 +138,9 @@ AnimatorState:
m_Name: Boss_Move_1
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_Transitions:
- {fileID: -5234480481874143179}
- {fileID: -5960863943501419562}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@ -60,7 +164,13 @@ AnimatorController:
m_PrefabAsset: {fileID: 0}
m_Name: boss
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorParameters:
- m_Name: State
m_Type: 3
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@ -74,6 +184,31 @@ AnimatorController:
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &2102501988603932205
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: State
m_EventTreshold: 1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -1701036716963345556}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.7794118
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1107 &4854017570470400453
AnimatorStateMachine:
serializedVersion: 6
@ -85,20 +220,20 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -2708652100068900557}
m_Position: {x: 280, y: 180, z: 0}
m_Position: {x: 300, y: 40, z: 0}
- serializedVersion: 1
m_State: {fileID: 6137305484940752271}
m_Position: {x: 270, y: 250, z: 0}
m_Position: {x: 440, y: 250, z: 0}
- serializedVersion: 1
m_State: {fileID: -1701036716963345556}
m_Position: {x: 270, y: 130, z: 0}
m_Position: {x: 580, y: 50, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_EntryPosition: {x: 50, y: 110, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -2708652100068900557}
@ -112,7 +247,9 @@ AnimatorState:
m_Name: Boss_Attak_1
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_Transitions:
- {fileID: 2102501988603932205}
- {fileID: 6696194820416691433}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@ -128,3 +265,28 @@ AnimatorState:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!1101 &6696194820416691433
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: State
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -2708652100068900557}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.7794118
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1

View File

@ -10,7 +10,8 @@ AnimatorState:
m_Name: WoniuMove
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_Transitions:
- {fileID: 1384410484589089456}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@ -37,7 +38,7 @@ AnimatorStateMachine:
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -3564240249193308846}
m_Position: {x: 320, y: 200, z: 0}
m_Position: {x: 320, y: 140, z: 0}
- serializedVersion: 1
m_State: {fileID: 7113374065487982496}
m_Position: {x: 320, y: 40, z: 0}
@ -59,7 +60,13 @@ AnimatorController:
m_PrefabAsset: {fileID: 0}
m_Name: snail_10
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorParameters:
- m_Name: State
m_Type: 3
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@ -73,6 +80,56 @@ AnimatorController:
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1101 &1384410484589089456
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: State
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 7113374065487982496}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.75
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &6879221536656622820
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 6
m_ConditionEvent: State
m_EventTreshold: 1
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: -3564240249193308846}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0
m_TransitionOffset: 0
m_ExitTime: 0.625
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &7113374065487982496
AnimatorState:
serializedVersion: 6
@ -83,7 +140,8 @@ AnimatorState:
m_Name: snail_Stand_1
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_Transitions:
- {fileID: 6879221536656622820}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0

View File

@ -236,7 +236,7 @@ MonoBehaviour:
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_Maskable: 0
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []

File diff suppressed because it is too large Load Diff

View File

@ -9,11 +9,21 @@ public class BettingBtn : MonoBehaviour
public Button NumBtn;
public Text BetText;
public float BetValue;//投注的值
public Button BetButton;//投注的按钮
public GameObject text1;
public GameObject text2;
public GameObject text3;
public GameObject text4;
public GameObject text5;
public GameObject text6;
// Start is called before the first frame update
void Start()
{
BetList.SetActive(false);
NumBtn.onClick.AddListener(OnClickNumBtn);
BetButton.onClick.AddListener(OnClickBetBtn);
BetValue = 50;//默认50
SetBet();
}
@ -24,6 +34,62 @@ public class BettingBtn : MonoBehaviour
}
void OnClickBetBtn()
{
if (HegemonTime.instance.timeNum>20)
{
switch (PlayerMovePos.instance.HouseId)
{
case 1:
if (PlayerInfo.instance.SetMoney(-BetValue))
{
text1.GetComponent<TextBox>().SetText(BetValue);
}
break;
case 2:
if (PlayerInfo.instance.SetMoney(-BetValue))
{
text2.GetComponent<TextBox>().SetText(BetValue);
}
break;
case 3:
if (PlayerInfo.instance.SetMoney(-BetValue))
{
text3.GetComponent<TextBox>().SetText(BetValue);
}
break;
case 4:
if (PlayerInfo.instance.SetMoney(-BetValue))
{
text4.GetComponent<TextBox>().SetText(BetValue);
}
break;
case 5:
if (PlayerInfo.instance.SetMoney(-BetValue))
{
text5.GetComponent<TextBox>().SetText(BetValue);
}
break;
case 6:
if (PlayerInfo.instance.SetMoney(-BetValue))
{
text6.GetComponent<TextBox>().SetText(BetValue);
}
break;
default:
Debug.Log("请选择房间");
break;
}
}
else
{
Debug.Log("现在无法投注");
}
}
void SetBet()
{
// 获取所有的Button组件

View File

@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BoosState : MonoBehaviour
{
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

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

View File

@ -10,6 +10,9 @@ public class BossContro : MonoBehaviour
public Transform BoosStartPos;
public static BossContro instance;
public Transform StartPos;
public Animator BossAni;//boos动画
public bool IsLeft;
// Start is called before the first frame update
void Start()
{
@ -35,8 +38,11 @@ public class BossContro : MonoBehaviour
// 需要时将 childObject 移回原始父物体,并设置为第一个子节点
transform.SetParent(originalParent);
transform.SetAsFirstSibling(); // 设置为第一个子节点
transform.position= StartPos.position;
BoosStartPos=StartPos;
}
public void BossMove()
@ -64,6 +70,7 @@ public class BossContro : MonoBehaviour
break;
}
//MoveParent();
BossAni.SetInteger("State", 1);//动画转为移动
GetComponent<PlayerMove>().StartMove();
}
}

View File

@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class EggNum : MonoBehaviour
{
public Text eggNumText;
public static EggNum instance;
// Start is called before the first frame update
void Start()
{
instance = this;
}
public void SetEggNumText()
{
eggNumText.text = PlayerInfo.instance.Money.ToString();
}
}

View File

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

View File

@ -27,7 +27,12 @@ public class FailPanel : BasePanel
base.HidePanel();
PlayerMovePos.instance.IsReturn = true;
BossContro.instance.ReturnParent();
MaskContro.instance.SetMask(false);
//都返回原来的位置
}
public override void ShowPanel()
{
base.ShowPanel();
BossContro.instance.ReturnParent();
}
}

View File

@ -31,10 +31,16 @@ public class HegemonTime : MonoBehaviour
timeText.text = (timeNum-carrySeconds).ToString(); // 显示整数秒数
yield return new WaitForSeconds(1f); // 等待1秒
timeNum -= 1;
if (timeNum<=20)
{
MaskContro.instance.SetMask(true);
}
timeNum = 60;
}
Debug.Log("Boos来了");
BossContro.instance.BossMove();
timeNum = 60;
}
}

View File

@ -20,7 +20,7 @@ public class HouseBtn : MonoBehaviour
Debug.Log("点击");
transform.GetComponent<PlayerMove>().StartMove();
PlayerMovePos.instance.HadChoise=true;
MaskContro.instance.SetMask(true);
}
}

View File

@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class HouseInfo : MonoBehaviour
{
public float Money;
public int PlayerNum;//Íæ¼ÒÊýÁ¿
// 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: e73a82b9916cf6e4aa1d0ca68d99cb72
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,34 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerInfo : MonoBehaviour
{
public static PlayerInfo instance;
public float Money = 1000;
// Start is called before the first frame update
void Start()
{
instance = this;
}
public bool SetMoney(float add)
{
if (Money+add>=0)
{
Money += add;
EggNum.instance.SetEggNumText();
return true;
}
Debug.Log("Ç®²»¹»");
return false;
}
// Update is called once per frame
void Update()
{
}
}

View File

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

View File

@ -66,27 +66,51 @@ public class PlayerMove : MonoBehaviour
if (EndPos == TypeEndPos1)
{
MoveInParent(Pos1Parent);
if (!IsBoos)
{
PlayerMovePos.instance.HouseId = 1;
}
}
else if (EndPos == TypeEndPos2)
{
MoveInParent(Pos2Parent);
if (!IsBoos)
{
PlayerMovePos.instance.HouseId = 2;
}
}
else if(EndPos == TypeEndPos3)
{
MoveInParent(Pos3Parent);
if (!IsBoos)
{
PlayerMovePos.instance.HouseId = 3;
}
}
else if (EndPos == TypeEndPos4)
{
MoveInParent(Pos4Parent);
if (!IsBoos)
{
PlayerMovePos.instance.HouseId = 4;
}
}
else if (EndPos == TypeEndPos5)
{
MoveInParent(Pos5Parent);
if (!IsBoos)
{
PlayerMovePos.instance.HouseId = 5;
}
}
else if (EndPos == TypeEndPos6)
{
MoveInParent(Pos6Parent);
if (!IsBoos)
{
PlayerMovePos.instance.HouseId = 6;
}
}
@ -182,21 +206,60 @@ public class PlayerMove : MonoBehaviour
public void AfterMove()
{
if (!PlayerMovePos.instance.IsReturn)
{
objectToMove.DOMoveY(objectToMove.position.y + 100, 0.5f).OnComplete(()=>{
JudgeEnd();
if (!IsBoos)
{
PlayerMovePos.instance.StartPos = EndPos;
Debug.Log("修改StartPos值" + PlayerMovePos.instance.StartPos);
PlayerMovePos.instance.PlayAni.SetInteger("State",0);
MaskContro.instance.SetMask(false);
}
else
{
//BossContro.instance.BossAni.SetInteger("State", 0);//停止移动
StartCoroutine(BoosAttack());
BossContro.instance.BoosStartPos = EndPos;
Debug.Log("修改BossPos值" + BossContro.instance.BoosStartPos);
//JudgeSuccOrFail();
}
});
}
else
{
PlayerMovePos.instance.IsReturn = false;//重置
MaskContro.instance.SetMask(false);
}
}
IEnumerator BoosAttack()
{
BossContro.instance.BossAni.SetInteger("State", 2);
yield return new WaitForSeconds(3f);
BossContro.instance.BossAni.SetInteger("State", 0);
JudgeSuccOrFail();
}
public void JudgeSuccOrFail()
{
if (BossContro.instance.BoosStartPos == PlayerMovePos.instance.StartPos && PlayerMovePos.instance.HadChoise)
{
//BossContro.instance.BossAni.SetInteger("State", 2);//boos攻击
Debug.Log("失败");//失败
FailPanel.instance.ShowPanel();
}
@ -210,34 +273,67 @@ public class PlayerMove : MonoBehaviour
Debug.Log("没有失败和胜利");//胜利
}
HegemonTime.instance.StartCoroutine(HegemonTime.instance.StartGame());//重新计算时间
}
if (!PlayerMovePos.instance.IsReturn)
public void Rotate()
{
objectToMove.DOMoveY(objectToMove.position.y + 100, 0.5f).OnComplete(()=>{
JudgeEnd();
if (!IsBoos) { MaskContro.instance.SetMask(false);}
});
}
else
{
PlayerMovePos.instance.IsReturn = false;//重置
}
Vector3 currentRotation = objectToMove.localEulerAngles;
currentRotation.y += 180f;
objectToMove.localEulerAngles = currentRotation;
}
public void OnMove(Vector3[] waypoints)
{
if (!IsBoos)
{
PlayerMovePos.instance.PlayAni.SetInteger("State", 1);
MaskContro.instance.SetMask(true);
}
MoveOutParent();
// 使用 DoTween 的 DOPath 方法创建路径动画
Tween pathTween = objectToMove.DOPath(waypoints, duration, PathType.Linear)
.SetEase(Ease.Linear) // 线性过渡效果
.SetEase(Ease.Linear) // 设置线性过渡效果
.SetLoops(isLooping ? -1 : 0)
.OnComplete(AfterMove);
.OnWaypointChange((index) =>
{
// 当物体到达某个路径点时回调
if (index < waypoints.Length - 1)
{
Vector3 currentWaypoint = waypoints[index];
Vector3 nextWaypoint = waypoints[index + 1];
if (IsBoos)
{
if (nextWaypoint.x < currentWaypoint.x && !BossContro.instance.IsLeft)
{
BossContro.instance.IsLeft = true;
// 旋转物体使其面向左侧绕Y轴旋转180度
Rotate();
}
else if (nextWaypoint.x > currentWaypoint.x && BossContro.instance.IsLeft)
{
BossContro.instance.IsLeft = false;
Rotate();
}
}
else
{
// 判断物体是否需要旋转
if (nextWaypoint.x < currentWaypoint.x && !PlayerMovePos.instance.IsLeft)
{
PlayerMovePos.instance.IsLeft = true;
// 旋转物体使其面向左侧绕Y轴旋转180度
Rotate();
}
else if (nextWaypoint.x > currentWaypoint.x && PlayerMovePos.instance.IsLeft)
{
PlayerMovePos.instance.IsLeft = false;
Rotate();
}
}
}
})
.OnComplete(AfterMove);
}
}

View File

@ -12,6 +12,12 @@ public class PlayerMovePos : MonoBehaviour
public bool HadChoise;//是否选择房间
public Transform Parent;
public bool IsReturn;
public Animator PlayAni;
public bool IsLeft;//是否面向左边
public int HouseId;//进的房间编号
// Start is called before the first frame update
void Start()
{
@ -19,9 +25,5 @@ public class PlayerMovePos : MonoBehaviour
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -25,8 +25,14 @@ public class SucceePanel : BasePanel
{
base.HidePanel();
BossContro.instance.ReturnParent();
//BossContro.instance.ReturnParent();
MaskContro.instance.SetMask(false);
//都返回原来的位置
}
public override void ShowPanel()
{
base.ShowPanel();
BossContro.instance.ReturnParent();
}
}

View File

@ -0,0 +1,24 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class TextBox : MonoBehaviour
{
public Text numText;
public Transform ParentHouse;
public Transform Parent;
// Start is called before the first frame update
void Start()
{
transform.SetParent(Parent);//¸Ä±ä¸¸½Úµã£¬ÏÔʾ³öÀ´
numText = transform.Find("Text").GetComponent<Text>();
SetText(0);
}
public void SetText(float add)
{
ParentHouse.GetComponent<HouseInfo>().Money += add;
numText.text = ParentHouse.GetComponent<HouseInfo>().Money.ToString();
}
}

View File

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