Ejemplo n.º 1
0
    /// <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;
    }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
 public virtual void SwitchAtkState(BossAtkState state)
 {
 }
Ejemplo n.º 4
0
        public BossStateMessage(BossState moveState, BossAtkState atkstate)
        {
            this.moveState = moveState;

            this.atkState = atkstate;
        }