更改接口
This commit is contained in:
parent
ee850feed5
commit
fd49f3da8c
@ -129,7 +129,7 @@ public class Card1 : MonoBehaviour
|
|||||||
|
|
||||||
public void DrawCard(STRUCT_TURN_CARD.LET_CARD_DEAL_SELF args)
|
public void DrawCard(STRUCT_TURN_CARD.LET_CARD_DEAL_SELF args)
|
||||||
{
|
{
|
||||||
List<REQUEST_METHODS> verificationList = new() { REQUEST_METHODS.POST };
|
List<RequestsMethods> verificationList = new() { RequestsMethods.POST };
|
||||||
if (!turnSingleton.VerificationRequestsMethods(args.METHOD, verificationList)) return;
|
if (!turnSingleton.VerificationRequestsMethods(args.METHOD, verificationList)) return;
|
||||||
if (!turnSingleton.VerificationSystemStatus(turnManager.GetState(), TURN_OS_STATE.STAY_SELF_TURN)) return;
|
if (!turnSingleton.VerificationSystemStatus(turnManager.GetState(), TURN_OS_STATE.STAY_SELF_TURN)) return;
|
||||||
if (!turnSingleton.VerificationActionStatus(turnManager.GetActionState(), TURN_ACTION_STATE.DEAL_RUNNING)) return;
|
if (!turnSingleton.VerificationActionStatus(turnManager.GetActionState(), TURN_ACTION_STATE.DEAL_RUNNING)) return;
|
||||||
@ -158,7 +158,7 @@ public class Card1 : MonoBehaviour
|
|||||||
|
|
||||||
public void DropCard(STRUCT_TURN_CARD.LET_CARD_DROP_SELF args) // 弃牌
|
public void DropCard(STRUCT_TURN_CARD.LET_CARD_DROP_SELF args) // 弃牌
|
||||||
{
|
{
|
||||||
List<REQUEST_METHODS> verificationList = new() { REQUEST_METHODS.DELETE };
|
List<RequestsMethods> verificationList = new() { RequestsMethods.DELETE };
|
||||||
if (!turnSingleton.VerificationRequestsMethods(args.METHOD, verificationList)) return;
|
if (!turnSingleton.VerificationRequestsMethods(args.METHOD, verificationList)) return;
|
||||||
|
|
||||||
card_status.SCALE = transform.localScale;
|
card_status.SCALE = transform.localScale;
|
||||||
|
|||||||
@ -3,13 +3,7 @@ using System.Collections.Generic;
|
|||||||
using Unity.VisualScripting;
|
using Unity.VisualScripting;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public enum REQUEST_METHODS // 事件方法
|
|
||||||
{
|
|
||||||
GET = 1, // 获取
|
|
||||||
PUT = 3, // 修改
|
|
||||||
POST = 0, // 默认发送, 不需要任何返回
|
|
||||||
DELETE = 2, // 删除
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum TURN_ACTION_STATE
|
public enum TURN_ACTION_STATE
|
||||||
{
|
{
|
||||||
|
|||||||
@ -6,7 +6,7 @@ public struct STRUCT_TURN_OS
|
|||||||
{
|
{
|
||||||
public struct LET_OS_DEAL_CARD // 系统发牌
|
public struct LET_OS_DEAL_CARD // 系统发牌
|
||||||
{
|
{
|
||||||
public REQUEST_METHODS METHOD;
|
public RequestsMethods METHOD;
|
||||||
public int DEFAULT_HAND_CARD_COUNT; // 手牌数量
|
public int DEFAULT_HAND_CARD_COUNT; // 手牌数量
|
||||||
public int DECK_CARD_COUNT; // 牌堆数量
|
public int DECK_CARD_COUNT; // 牌堆数量
|
||||||
public float MOVE_ANIMATION_DURATION; // 移动动画时长
|
public float MOVE_ANIMATION_DURATION; // 移动动画时长
|
||||||
@ -30,7 +30,7 @@ public struct STRUCT_TURN_CARD
|
|||||||
{
|
{
|
||||||
public struct LET_CARD_DEAL_SELF // 抽卡
|
public struct LET_CARD_DEAL_SELF // 抽卡
|
||||||
{
|
{
|
||||||
public REQUEST_METHODS METHOD;
|
public RequestsMethods METHOD;
|
||||||
public int ID;
|
public int ID;
|
||||||
public Vector3 POSITION;
|
public Vector3 POSITION;
|
||||||
public Quaternion ROTATION;
|
public Quaternion ROTATION;
|
||||||
@ -41,7 +41,7 @@ public struct STRUCT_TURN_CARD
|
|||||||
|
|
||||||
public struct LET_CARD_DROP_SELF // 弃牌
|
public struct LET_CARD_DROP_SELF // 弃牌
|
||||||
{
|
{
|
||||||
public REQUEST_METHODS METHOD;
|
public RequestsMethods METHOD;
|
||||||
public int ID;
|
public int ID;
|
||||||
public Vector3 POSITION;
|
public Vector3 POSITION;
|
||||||
public float DURATION;
|
public float DURATION;
|
||||||
|
|||||||
@ -22,7 +22,7 @@ public class TurnSingleton : MonoBehaviour
|
|||||||
DontDestroyOnLoad(gameObject);
|
DontDestroyOnLoad(gameObject);
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool VerificationRequestsMethods(REQUEST_METHODS method, List<REQUEST_METHODS> verificationList)
|
public bool VerificationRequestsMethods(RequestsMethods method, List<RequestsMethods> verificationList)
|
||||||
{
|
{
|
||||||
if (verificationList == null)
|
if (verificationList == null)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user