示例#1
0
 protected virtual void StopDealing()
 {
     if (DealingCharacter == null)
     {
         ClearDealingData();
         return;
     }
     // Set dealing state/data for co player character entity
     DealingCharacter.ClearDealingData();
     DealingCharacter.DealingCharacter = null;
     // Set dealing state/data for player character entity
     ClearDealingData();
     DealingCharacter = null;
 }
示例#2
0
 protected virtual void NetFuncAcceptDealingRequest()
 {
     if (DealingCharacter == null)
     {
         gameManager.SendServerGameMessage(ConnectionId, GameMessage.Type.CannotAcceptDealingRequest);
         StopDealing();
         return;
     }
     if (Vector3.Distance(CacheTransform.position, DealingCharacter.CacheTransform.position) > gameInstance.conversationDistance)
     {
         gameManager.SendServerGameMessage(ConnectionId, GameMessage.Type.CharacterIsTooFar);
         StopDealing();
         return;
     }
     // Set dealing state/data for co player character entity
     DealingCharacter.ClearDealingData();
     DealingCharacter.DealingState = DealingState.Dealing;
     DealingCharacter.RequestAcceptedDealingRequest(ObjectId);
     // Set dealing state/data for player character entity
     ClearDealingData();
     DealingState = DealingState.Dealing;
     RequestAcceptedDealingRequest(DealingCharacter.ObjectId);
 }