You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
96 lines
2.3 KiB
96 lines
2.3 KiB
4 years ago
|
using AX.NetworkSystem;
|
||
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class TrappedHaemalController : BaseHaemalController
|
||
|
{
|
||
|
|
||
|
// Use this for initialization
|
||
|
public override void Start()
|
||
|
{
|
||
|
base.Start();
|
||
|
Haemal = 100;
|
||
|
LastFireManId = GetComponent<TrappedMoveFree>().FireManlastID;
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 扣血方法
|
||
|
/// </summary>
|
||
|
public override void BucklebloodMeetDangerous()
|
||
|
{
|
||
|
if (Haemal >= 50)
|
||
|
{
|
||
|
if (aroundState == AroundState.FireNear)
|
||
|
{
|
||
|
Haemal -= (float)(5.0 / 6.0);
|
||
|
}
|
||
|
else if (aroundState == AroundState.SmokeNear)
|
||
|
{
|
||
|
Haemal -= (float)(5.0 / 18);
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|
||
|
//伤员处理
|
||
|
else if (Haemal > 0)
|
||
|
{
|
||
|
if (IsMoving)
|
||
|
{
|
||
|
return;
|
||
|
}
|
||
|
if (aroundState == AroundState.FireNear)
|
||
|
{
|
||
|
Haemal -= (float)(5.0 / 18);
|
||
|
}
|
||
|
else if (aroundState == AroundState.SmokeNear)
|
||
|
{
|
||
|
if (!HasMashk)
|
||
|
{
|
||
|
Haemal -= (float)(5.0 / 78);
|
||
|
}
|
||
|
else { }
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
if (!BeFristAid)
|
||
|
{
|
||
|
Haemal -= (float)(1.0 / 30);
|
||
|
}
|
||
|
else { }
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
if (IsStillAlive)
|
||
|
{
|
||
|
IsStillAlive = false;
|
||
|
Debug.Log("dead");
|
||
|
Haemal = 0;
|
||
|
DeadDispose();
|
||
|
}
|
||
|
}
|
||
|
//HaemalSyncData arg = new HaemalSyncData();
|
||
|
//arg.gameObjID = GetComponent<BaseGameObjInfo>().gameObjID;
|
||
|
//arg.SendUserID = CurrentUserInfo.mySelf.Id;
|
||
|
//if (Haemal==50)
|
||
|
//{
|
||
|
// arg.FallDown = true;
|
||
|
//}
|
||
|
//arg.Haemal = Haemal;
|
||
|
//NetworkManager.Default.SendAsync("HAEMAL_BLOOD_SYNC", arg);
|
||
|
}
|
||
|
|
||
|
/// <summary>
|
||
|
/// 死亡处理
|
||
|
/// </summary>
|
||
|
public override void DeadDispose()
|
||
|
{
|
||
|
//加入事件触发列表
|
||
|
//EventReportController.Instance.EventReportList.Add();
|
||
|
}
|
||
|
}
|