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.
|
|
|
using AX.NetworkSystem;
|
|
|
|
using System.Collections;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using UnityEngine;
|
|
|
|
|
|
|
|
public class WoundedHaemalController : BaseHaemalController {
|
|
|
|
|
|
|
|
public override void Start()
|
|
|
|
{
|
|
|
|
base.Start();
|
|
|
|
Haemal = 50;
|
|
|
|
LastFireManId = WoundedSave.FireManlastID;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Update is called once per frame
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 扣血方法
|
|
|
|
/// </summary>
|
|
|
|
public override void BucklebloodMeetDangerous()
|
|
|
|
{
|
|
|
|
if (Haemal > 0)
|
|
|
|
{
|
|
|
|
if (IsMoving)
|
|
|
|
{
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (aroundState == AroundState.FireNear)
|
|
|
|
{
|
|
|
|
Haemal -= (float)(5.0 / 18)* Speed;
|
|
|
|
}
|
|
|
|
else if (aroundState == AroundState.SmokeNear)
|
|
|
|
{
|
|
|
|
if (!HasMashk)
|
|
|
|
{
|
|
|
|
Haemal -= (float)(5.0 / 78) * Speed;
|
|
|
|
}
|
|
|
|
else { }
|
|
|
|
}
|
|
|
|
else if ((aroundState == AroundState.Normal))
|
|
|
|
{
|
|
|
|
if (!BeFristAid)
|
|
|
|
{
|
|
|
|
Haemal -= (float)(1.0 / 30) * Speed;
|
|
|
|
}
|
|
|
|
else { }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//HaemalSyncData arg = new HaemalSyncData();
|
|
|
|
//arg.gameObjID = GetComponent<BaseGameObjInfo>().gameObjID;
|
|
|
|
//arg.SendUserID = CurrentUserInfo.mySelf.Id;
|
|
|
|
//arg.Haemal = Haemal;
|
|
|
|
//NetworkManager.Default.SendAsync("HAEMAL_BLOOD_SYNC", arg);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (IsStillAlive)
|
|
|
|
{
|
|
|
|
IsStillAlive = false;
|
|
|
|
Debug.Log("dead");
|
|
|
|
Haemal = 0;
|
|
|
|
DeadDispose();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// 死亡处理
|
|
|
|
/// </summary>
|
|
|
|
public override void DeadDispose()
|
|
|
|
{
|
|
|
|
//加入事件触发列表
|
|
|
|
//EventReportController.Instance.EventReportList.Add();
|
|
|
|
}
|
|
|
|
}
|