/// <summary> /// 切换攻击状态 /// </summary> /// <param name="state"></param> public override void SwitchAtkState(BossAtkState state) { if (bossState == BossState.Death) { return; } if (bossAtkState == state) { return; } switch (state) { case BossAtkState.None: break; case BossAtkState.Shoot: bossAnimator.SetBool("Shoot", true); bossAnimator.SetFloat("ShootSpeed", 1.5f); break; case BossAtkState.Trample: bossAnimator.SetTrigger("Trample"); bossAnimator.SetFloat("TrampleSpeed", 1.5f); break; case BossAtkState.Skill: break; } bossAtkState = state; }
/// <summary> /// Boss的状态信息 /// </summary> /// <param name="state"></param> /// <param name="id"></param> /// <param name="listNum"></param> public void SendBossStateMsg(BossState state, BossAtkState s, int id) { byte[] by = BossStateMessage.GetBytes( new BossStateMessage(state, s)); NetworkMessage message = new NetworkMessage(71, NetworkTools.GetLocalIP(), by); byte[] bytes = NetworkMessage.GetBytes(message); SendMsg(RoomSingle.roomIP, NetworkConstent.UDPServerPort, bytes); }
public virtual void SwitchAtkState(BossAtkState state) { }
public BossStateMessage(BossState moveState, BossAtkState atkstate) { this.moveState = moveState; this.atkState = atkstate; }