2024-12-28 14:10:54 +08:00
|
|
|
|
using System;
|
2024-12-04 15:05:38 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
2024-12-06 15:15:30 +08:00
|
|
|
|
using System.Threading.Tasks;
|
2024-12-04 15:05:38 +08:00
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
|
|
public class PlayerState : MonoBehaviour
|
|
|
|
|
{
|
|
|
|
|
|
2024-12-28 14:10:54 +08:00
|
|
|
|
PlayerJoinResponse playerJoinResponse;
|
|
|
|
|
string UserName;// <20>û<EFBFBD><C3BB><EFBFBD>
|
|
|
|
|
string RoomId;// <20><><EFBFBD><EFBFBD>Id
|
|
|
|
|
int Status;//<2F><>̬<EFBFBD><CCAC><EFBFBD>ؼ<EFBFBD><D8BC><EFBFBD> 1<><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 2<>ѽ<EFBFBD><D1BD><EFBFBD>
|
|
|
|
|
string RoleName;// <20><>ɫ<EFBFBD><C9AB>
|
|
|
|
|
int IsLeadingNPC;//1=<3D><>ְҵ<D6B0>зֹ<D0B7>NPC<50>Ĺ<EFBFBD>
|
|
|
|
|
bool Online;// <20>ж<EFBFBD><D0B6>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD> true <20><><EFBFBD><EFBFBD> false <20><><EFBFBD><EFBFBD>
|
|
|
|
|
int RoleId =7;// <20><>ɫid
|
|
|
|
|
int GroupLeader = 8;// <20>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD>鳤 0 <20><>Ա 1 <20>鳤 2 <20><>ָ<EFBFBD><D6B8> 3 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
int ActionHode;//0=<3D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>1=ָ<><D6B8>ʽ<EFBFBD>ж<EFBFBD>2=<3D><><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>
|
|
|
|
|
int Group =10;//С<><D0A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -1 <20><EFBFBD><DEB9><EFBFBD> <20><>ֵ<EFBFBD>й<EFBFBD><D0B9><EFBFBD>
|
|
|
|
|
double X = 11;// <20><><EFBFBD><EFBFBD>X
|
|
|
|
|
double Y = 12;// <20><><EFBFBD><EFBFBD>Y
|
|
|
|
|
double Z = 13;// <20><><EFBFBD><EFBFBD>Z
|
|
|
|
|
string OverseeCond;// <20>ֹ<EFBFBD><D6B9><EFBFBD><EFBFBD><EFBFBD>ID
|
|
|
|
|
int SendFraneCount=15;//<2F><><EFBFBD>ҷ<EFBFBD><D2B7>͵<EFBFBD>֡<EFBFBD><D6A1>
|
|
|
|
|
int HovespeedFirst;//<2F>ƶ<EFBFBD><C6B6>ٶ<EFBFBD>1
|
|
|
|
|
int Movespeedsecond = 17;//<2F>ƶ<EFBFBD><C6B6>ٶ<EFBFBD>2
|
|
|
|
|
int MoveSpeedThird = 18;//<2F>ƶ<EFBFBD><C6B6>ٶ<EFBFBD>3
|
|
|
|
|
int BearLoad = 19;// <20><><EFBFBD><EFBFBD>
|
|
|
|
|
int Protection = 20;//<2F><><EFBFBD><EFBFBD>ֵ
|
|
|
|
|
int Health = 100;//<2F><><EFBFBD><EFBFBD>ֵ 100
|
|
|
|
|
int Rolestatus = 22;//<2F><>ɫ<EFBFBD><C9AB>̬ 0<><30><EFBFBD><EFBFBD> 1<>ж<EFBFBD><D0B6><EFBFBD><EFBFBD><EFBFBD> 2<><32><EFBFBD><EFBFBD> 3<><33><EFBFBD><EFBFBD> 4<>ֱ<EFBFBD><D6B1><EFBFBD>
|
|
|
|
|
int UserId = 23;// <20>û<EFBFBD>id
|
|
|
|
|
|
|
|
|
|
|
2024-12-04 15:05:38 +08:00
|
|
|
|
[Header("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ѫ<EFBFBD><D1AA>")]
|
2024-12-04 16:40:48 +08:00
|
|
|
|
public float totalHp = 100;
|
2024-12-04 15:05:38 +08:00
|
|
|
|
[Header("<22><><EFBFBD>ҵ<EFBFBD>ǰѪ<C7B0><D1AA>")]
|
|
|
|
|
public float currentHp;
|
|
|
|
|
[Header("<22>ֿ<EFBFBD><D6BF><EFBFBD>")]
|
|
|
|
|
public float defend;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Start is called before the first frame update
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
2024-12-28 14:10:54 +08:00
|
|
|
|
|
2024-12-04 16:40:48 +08:00
|
|
|
|
currentHp = totalHp;
|
2024-12-04 15:05:38 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
void Update()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-04 16:40:48 +08:00
|
|
|
|
public void beHurt(float hurt)
|
2024-12-04 15:05:38 +08:00
|
|
|
|
{
|
2024-12-05 09:21:07 +08:00
|
|
|
|
if(currentHp >0)
|
|
|
|
|
{
|
|
|
|
|
currentHp -= hurt;
|
|
|
|
|
Debug.Log(currentHp);
|
2024-12-06 15:15:30 +08:00
|
|
|
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD><EFBFBD>
|
|
|
|
|
ScreenRed.instance.ShowRed();
|
2024-12-05 09:21:07 +08:00
|
|
|
|
}
|
2024-12-04 15:05:38 +08:00
|
|
|
|
if(currentHp <= 0)
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2024-12-06 15:15:30 +08:00
|
|
|
|
|
2024-12-04 15:05:38 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|