/// <summary> /// 更新战斗属性,主要是移动速度 /// </summary> public void UpdateBattleAttribute() { if (ParentActor == null) { return; } if (mActorAttr != null) { if (ParentActor.ActorAttribute != null) { mActorAttr.MoveSpeedScale = (int)(ParentActor.ActorAttribute.MoveSpeedScale); mActorAttr.MoveSpeedAdd = (int)(ParentActor.ActorAttribute.MoveSpeedAdd); SetMoveSpeedScale(mActorAttr.MoveSpeedScale * GlobalConst.AttrConvert, mActorAttr.MoveSpeedAdd); } } AnimationOptions op = GetWalkAniOptions(); if (op != null) { AnimationOptions parent_actor_walk_options = ParentActor.GetWalkAniOptions(); if (parent_actor_walk_options != null) { op.Speed = parent_actor_walk_options.Speed; } // 护送NPC的走路动作要使用原始速度 if (IsEscortNPC == true) { mAnimationSpeed = mOriginalWalkAniSpeed / op.Speed; SetAnimationSpeed(mAnimationSpeed); } } }
public override void AssociationReleasedEventHandler(DicomThread storageCommitScp) { // do SCP specific post association processing here // iterate over all the dicomMessages in the data warehouse foreach (DicomMessage dicomMessage in storageCommitScp.DataWarehouse.Messages(storageCommitScp).DicomMessages) { // check for the N-ACTION-RQ if (dicomMessage.CommandSet.DimseCommand == DvtkData.Dimse.DimseCommand.NACTIONRQ) { // produce a DICOM trigger for the Storage Commitment SCU - N-EVENT-REPORT-RQ DicomTrigger storageCommitTrigger = GenerateTrigger(dicomMessage); ParentActor.TriggerActor(ActorName, storageCommitTrigger); } } // call base implementation to generate event, update transaction log and cleanup data warehouse base.AssociationReleasedEventHandler(storageCommitScp); }
/// <summary> /// 更新战斗属性 /// </summary> public virtual void UpdateBattleAttribute() { if (ParentActor == null) { return; } this.AttackSpeed = ParentActor.AttackSpeed; mActorAttr.MoveSpeedScale = ParentActor.ActorAttribute.MoveSpeedScale; mActorAttr.MoveSpeedAdd = ParentActor.ActorAttribute.MoveSpeedAdd; AnimationOptions parent_actor_walk_options = ParentActor.GetWalkAniOptions(); AnimationOptions op = GetWalkAniOptions(); if (op != null && parent_actor_walk_options != null) { op.Speed = parent_actor_walk_options.Speed; } }
/// <summary> /// Handle the Mesage Received Event for DICOM N-ACTION-RQ messages. /// </summary> /// <param name="dicomProtocolMessage">Received DICOM Protocol Message.</param> public override void ScpMessageReceivedEventHandler(DicomProtocolMessage dicomProtocolMessage) { // use the common config option 1 to determine how the storage commitment should be handled if (ConfigOption1.Equals("DO_STORAGE_COMMITMENT_ON_SINGLE_ASSOCIATION") == false) { if (dicomProtocolMessage is DicomMessage) { DicomMessage dicomMessage = (DicomMessage)dicomProtocolMessage; // check for the N-ACTION-RQ if (dicomMessage.CommandSet.DimseCommand == DvtkData.Dimse.DimseCommand.NACTIONRQ) { // produce a DICOM trigger for the Storage Commitment SCU - N-EVENT-REPORT-RQ DicomTrigger storageCommitTrigger = GenerateTrigger(dicomMessage); bool triggerResult = ParentActor.TriggerActorInstances(ActorName.Type, storageCommitTrigger, false); } } } // call base implementation to generate event, update transaction log and cleanup data warehouse base.ScpMessageReceivedEventHandler(dicomProtocolMessage); }
protected override Tuple <IActorCreator, ActorSystem> GetActorCreator(LocalActorRefFactory localActorRefFactory, IBootstrapper bootstrapper = null) { if (bootstrapper == null) { var testBootstrapper = new TestBootstrapper(); if (localActorRefFactory != null) { testBootstrapper.LocalActorRefFactory = localActorRefFactory; } bootstrapper = testBootstrapper; } var system = new InternalActorSystem("default", bootstrapper); system.Start(); Actor actor = null; system.CreateActor(ActorCreationProperties.Create(() => { actor = new ParentActor(); return(actor); }), "Parent"); return(new Tuple <IActorCreator, ActorSystem>(actor, system)); }