Exemple #1
0
 private bool checkCanInteractWithFilter(FilterTriggerAction filter)
 {
     if (AvatarDataHandle.TryGetPlayerHandle(base.gameObject, out var handle) && dataEntityCollection.TryGetComponent <SessionIdData>(handle, out var component) && filter.CanInteract(component.SessionId, base.gameObject) && (string.IsNullOrEmpty(filter.OwnerTag) || CompareTag(filter.OwnerTag)))
     {
         return(true);
     }
     return(false);
 }
Exemple #2
0
 private bool checkCanInteractWithFilter(GameObject actionGraphGO, FilterTriggerAction filter)
 {
     if (DataEntityCollection.TryGetComponent <SessionIdData>(PlayerHandle, out var component))
     {
         return(filter.CanInteract(component.SessionId, actionGraphGO));
     }
     return(false);
 }
    protected override void CopyTo(Action _destAction)
    {
        FilterTriggerAction filterTriggerAction = _destAction as FilterTriggerAction;

        filterTriggerAction.OwnerTag          = OwnerTag;
        filterTriggerAction.TriggerEveryFrame = TriggerEveryFrame;
        filterTriggerAction.ExcludeIfSitting  = ExcludeIfSitting;
        filterTriggerAction.ExcludeIfSwimming = ExcludeIfSwimming;
        filterTriggerAction.ExcludeIfInAir    = ExcludeIfInAir;
        base.CopyTo(_destAction);
    }
Exemple #4
0
        protected bool canInteractWithActionGraph(GameObject actionGraphGO)
        {
            bool result = false;
            FilterTriggerAction component = actionGraphGO.GetComponent <FilterTriggerAction>();

            if (component == null)
            {
                result = true;
            }
            else if (actionGraphGO.activeInHierarchy)
            {
                result = checkCanInteractWithFilter(component);
            }
            return(result);
        }
Exemple #5
0
 public override void AssignPointsToCompetitors(List <Competitor <GameObject> > competitors)
 {
     for (int i = 0; i < competitors.Count; i++)
     {
         Competitor <GameObject> competitor = competitors[i];
         if (competitor.Value.IsDestroyed())
         {
             competitor.Points = 0;
             continue;
         }
         FilterTriggerAction component = competitor.Value.GetComponent <FilterTriggerAction>();
         if (component != null && !checkCanInteractWithFilter(competitor.Value, component))
         {
             competitor.Points = 0;
             continue;
         }
         ForceInteractionAction component2 = competitor.Value.GetComponent <ForceInteractionAction>();
         if (component2 != null)
         {
             competitor.Points = 100;
             continue;
         }
         InteractionIdentifier component3 = competitor.Value.GetComponent <InteractionIdentifier>();
         if (component3 != null)
         {
             competitor.Points = getScoreFromInteractionIdentifier(component3);
             continue;
         }
         GameObject gameObject = null;
         if (DataEntityCollection.TryGetComponent <GameObjectReferenceData>(PlayerHandle, out var component4))
         {
             gameObject = component4.GameObject;
         }
         bool flag  = participation.ParticipatingGO == competitor && participation.CurrentParticipationState == ParticipationState.Participating;
         bool flag2 = competitor.Value.GetComponent <PropExperience>() != null && gameObject != null && !gameObject.IsDestroyed() && competitor.Value.transform.root == gameObject.transform;
         if (flag || flag2)
         {
             competitor.Points = 95;
             continue;
         }
         bool flag3 = competitor.Value.GetComponent <Prop>() != null;
         bool flag4 = competitor.Value.GetComponent <SendQuestEvent>() != null;
         bool flag5 = competitor.Value.GetComponent <Action>() != null;
         bool flag6 = competitor.Value.GetComponent <PropExperience>() != null;
         if (flag3)
         {
             competitor.Points = 94;
         }
         if (flag4)
         {
             competitor.Points = 80;
         }
         if (flag5)
         {
             competitor.Points = 70;
         }
         if (flag6)
         {
             competitor.Points = 60;
         }
     }
 }