コード例 #1
0
 protected override void OnRemoteEntityAnimatorParameterChanged(Packet_Entity_AnimatorParameterChange packet)
 {
     if (this._monster.IsActive())
     {
         base.OnRemoteEntityAnimatorParameterChanged(packet);
     }
 }
コード例 #2
0
        protected virtual void OnRemoteEntityAnimatorParameterChanged(Packet_Entity_AnimatorParameterChange packet)
        {
            switch (packet.Parameter)
            {
            case 1:
                this._animatorEntity.SetLocomotionFloat(packet.StateHash, packet.FloatValue, false);
                break;

            case 3:
                this._animatorEntity.SetLocomotionInteger(packet.StateHash, packet.IntValue, false);
                break;

            case 4:
                this._animatorEntity.SetLocomotionBool(packet.StateHash, packet.BoolValue, false);
                break;
            }
        }
コード例 #3
0
        public void AuthorityUserInputControllerChanged(AnimatorParameterEntry entry)
        {
            MPSendPacketContainer pc = Singleton <MPManager> .Instance.CreateSendPacket <Packet_Entity_AnimatorParameterChange>();

            Packet_Entity_AnimatorParameterChange.StartPacket_Entity_AnimatorParameterChange(pc.builder);
            Packet_Entity_AnimatorParameterChange.AddStateHash(pc.builder, entry.stateHash);
            Packet_Entity_AnimatorParameterChange.AddParameter(pc.builder, (byte)entry.type);
            switch (entry.type)
            {
            case AnimatorControllerParameterType.Float:
                Packet_Entity_AnimatorParameterChange.AddFloatValue(pc.builder, entry.floatValue);
                break;

            case AnimatorControllerParameterType.Int:
                Packet_Entity_AnimatorParameterChange.AddIntValue(pc.builder, entry.intValue);
                break;

            case AnimatorControllerParameterType.Bool:
                Packet_Entity_AnimatorParameterChange.AddBoolValue(pc.builder, entry.boolValue);
                break;
            }
            pc.Finish <Packet_Entity_AnimatorParameterChange>(Packet_Entity_AnimatorParameterChange.EndPacket_Entity_AnimatorParameterChange(pc.builder));
            Singleton <MPManager> .Instance.SendReliableToOthers(base.runtimeID, pc);
        }