public void StartObserving(GameObject go, ParticipationController data, Competitor <GameObject> competitor) { if (!Observed.ContainsKey(go)) { Observed[go] = new ObservationData(data, competitor); } }
public static void AddParticipationFilter(ParticipationController participationController) { if (participationController != null) { participationController.AddParticipationFilter(new PartyGameParticipationFilter()); } }
public static void RemoveParticipationFilter(ParticipationController participationController) { if (participationController != null) { participationController.RemoveParticipationFilter("party_game"); } }
public override void OnDestroy() { base.OnDestroy(); ParticipationController obj = participationController; obj.InitializationCompleteAction = (System.Action)Delegate.Remove(obj.InitializationCompleteAction, new System.Action(onParticipationControllerInitializationComplete)); }
public override void Awake() { base.Awake(); participationController = GetComponent <ParticipationController>(); ParticipationController obj = participationController; obj.InitializationCompleteAction = (System.Action)Delegate.Combine(obj.InitializationCompleteAction, new System.Action(onParticipationControllerInitializationComplete)); participantReference = null; }
private void onParticipationControllerInitializationComplete() { ParticipationController obj = participationController; obj.InitializationCompleteAction = (System.Action)Delegate.Remove(obj.InitializationCompleteAction, new System.Action(onParticipationControllerInitializationComplete)); isReadyForParticipation = true; if (pendingParticipationRequest != null) { participationController.PrepareParticipation(pendingParticipationRequest); } }
private void stopInteractingWithProp() { if (!PlayerHandle.IsNull && dataEntityCollection.TryGetComponent <GameObjectReferenceData>(PlayerHandle, out var component)) { ParticipationController component2 = component.GameObject.GetComponent <ParticipationController>(); if (component2 != null) { component2.StopParticipation(new ParticipationRequest(ParticipationRequest.Type.Stop, Prop.gameObject, "PropUser")); } } }
public ScavengerHunt() { playerIdToRoleIndicators = new Dictionary <long, GameObject>(); itemIdToItemGameObject = new Dictionary <int, GameObject>(); jsonService = Service.Get <JsonService>(); localPlayerParticipationController = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <ParticipationController>(); localPlayerSessionId = Service.Get <CPDataEntityCollection>().LocalPlayerSessionId; parentTransform = new GameObject("ScavengerHunt_" + base.sessionId).transform; getDefinitions(); addListeners(); }
private void destroySelf() { if (isInvitationLocalPlayer) { ParticipationController component = invitingPlayerObject.GetComponent <ParticipationController>(); if (component != null) { component.ForceStopParticipation(new ParticipationRequest(ParticipationRequest.Type.Stop, itemObject, "PenguinInteraction")); } } restoreCamera(); UnityEngine.Object.Destroy(base.gameObject); }
public FishBucket() { dispatcher = Service.Get <EventDispatcher>(); playersAbandonded = new List <long>(); localPlayerParticipationController = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <ParticipationController>(); jsonService = Service.Get <JsonService>(); localPlayerSessionId = Service.Get <CPDataEntityCollection>().LocalPlayerSessionId; localPlayerGameObject = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject; dataEntityCollection = Service.Get <CPDataEntityCollection>(); createFishBucketAnimationController(); addListeners(); getDefinitions(); }
public FindFour() { dataEntityCollection = Service.Get <CPDataEntityCollection>(); disablerManager = Service.Get <UIElementDisablerManager>(); dispatcher = Service.Get <EventDispatcher>(); jsonService = Service.Get <JsonService>(); localPlayerSessionId = dataEntityCollection.LocalPlayerSessionId; localPlayerGameObject = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject; localPlayerParticipationController = localPlayerGameObject.GetComponent <ParticipationController>(); DataEntityHandle handle = dataEntityCollection.FindEntityByName("ControlsScreenData"); controlsData = dataEntityCollection.GetComponent <ControlsScreenData>(handle); addListeners(); getDefinitions(); }
public DanceBattle() { dataEntityCollection = Service.Get <CPDataEntityCollection>(); dispatcher = Service.Get <EventDispatcher>(); eventChannel = new EventChannel(dispatcher); localPlayerSessionId = dataEntityCollection.LocalPlayerSessionId; partyGameDefinition = getPartyGameDefinition(3); localPlayerParticipationController = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject.GetComponent <ParticipationController>(); PartyGameUtils.DisableMainNavigation(); GameObject gameObject = GameObject.FindWithTag(UIConstants.Tags.UI_Tray_Root); if (gameObject != null) { trayFSMContext = gameObject.GetComponent <StateMachineContext>(); } }
public Index() { ac = new AdherentController(); acc = new ActiviteController(); bcc = new BudgetCategorieController(); oc = new OrganisateurController(); cl = new ClubController(); ce = new CentreController(); av = new Agence_VoyageController(); pc = new ParticipationController(); paC = new PayaimentController(); adC = new AdminController(); bc = new BudgetController(); participantController = new ParticipantController(); contribuesController = new ContribuesController(); InitializeComponent(); }
private IEnumerator Start() { bool animationCompleted = false; if (DelaySeconds > 0f) { yield return(new WaitForSeconds(DelaySeconds)); } localPlayerGameObject = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject; if (localPlayerGameObject != null) { RunController runController = localPlayerGameObject.GetComponent <RunController>(); ParticipationController participationController = localPlayerGameObject.GetComponent <ParticipationController>(); if (runController != null && runController.enabled && participationController != null && (participationController.GetParticipationData().CurrentParticipationState == ParticipationState.Ready || participationController.GetParticipationData().CurrentParticipationState == ParticipationState.Pending)) { Animator animator = localPlayerGameObject.GetComponent <Animator>(); if (animator != null) { localPlayerGameObject.GetComponent <Animator>().SetTrigger(AnimationTrigger); focusCameraOnPenguin(); if (this.OnAnimationStarted != null) { this.OnAnimationStarted(); } yield return(null); yield return(new WaitForSeconds(animator.GetCurrentAnimatorClipInfo(0)[0].clip.length)); animationCompleted = true; } } } if (wasCameraMoved) { resetCamera(); } if (this.OnAnimationEnded != null) { this.OnAnimationEnded(animationCompleted); } UnityEngine.Object.Destroy(base.gameObject); }
protected override void Update() { PropUser component = GetComponent <PropUser>(); ParticipationController component2 = GetComponent <ParticipationController>(); ParticipationState participationState = (ParticipationState)Enum.Parse(typeof(ParticipationState), State); if (component != null && component2 != null) { Competitor <GameObject> currentInteractingParticipantReference = component2.GetCurrentInteractingParticipantReference(); if (component2.IsInteractingWithGameObject(base.gameObject) && participationState == ParticipationState.Pending) { component2.StopParticipation(new ParticipationRequest(ParticipationRequest.Type.Stop, currentInteractingParticipantReference, "SetPlayerParticipationStateAction")); } else if (participationState == ParticipationState.Participating) { component2.StartParticipation(new ParticipationRequest(ParticipationRequest.Type.Start, base.gameObject, "SetPlayerParticipationStateAction")); } } Completed(); }
public IEnumerator Start() { playerPenguinGO = SceneRefs.ZoneLocalPlayerManager.LocalPlayerGameObject; if (playerPenguinGO != null) { RunController runController = playerPenguinGO.GetComponent <RunController>(); ParticipationController participationController = playerPenguinGO.GetComponent <ParticipationController>(); if (runController != null && runController.enabled && participationController != null && (participationController.GetParticipationData().CurrentParticipationState == ParticipationState.Ready || participationController.GetParticipationData().CurrentParticipationState == ParticipationState.Pending)) { Animator anim = playerPenguinGO.GetComponent <Animator>(); if (anim != null) { playerPenguinGO.GetComponent <Animator>().SetTrigger("LevelUp"); focusCameraOnPenguin(); yield return(null); yield return(new WaitForSeconds(anim.GetCurrentAnimatorClipInfo(0)[0].clip.length)); } } } Object.Destroy(base.gameObject); }
public static bool CanPlaySizzle(GameObject go) { bool result = false; if (go != null) { ParticipationController component = go.GetComponent <ParticipationController>(); if (component == null || !component.IsInteracting()) { RunController component2 = go.GetComponent <RunController>(); if (component2 != null && component2.enabled) { Animator component3 = go.GetComponent <Animator>(); if (component3 != null) { AnimatorStateInfo currentAnimatorStateInfo = component3.GetCurrentAnimatorStateInfo(AnimationHashes.Layers.Base); result = IsIdling(currentAnimatorStateInfo) || currentAnimatorStateInfo.IsTag("Sizzling"); } } } } return(result); }
private void startPropInteraction() { if (PlayerHandle.IsNull || !dataEntityCollection.TryGetComponent <GameObjectReferenceData>(PlayerHandle, out var component)) { return; } Animator component2 = component.GameObject.GetComponent <Animator>(); if (component2 != null) { AnimatorStateInfo animatorStateInfo = LocomotionUtils.GetAnimatorStateInfo(component2, 1); if (!LocomotionUtils.IsHolding(animatorStateInfo)) { component2.Play(AnimationHashes.States.TorsoHold, AnimationHashes.Layers.Torso); } } ParticipationController component3 = component.GameObject.GetComponent <ParticipationController>(); if (component3 != null) { component3.StartParticipation(new ParticipationRequest(ParticipationRequest.Type.Start, Prop.gameObject, "PropUser")); } }
private void setInteractionButtonActive() { if (PlayerHandle.IsNull || Prop.PropDef.PropType == PropDefinition.PropTypes.PartyGame || !dataEntityCollection.TryGetComponent <GameObjectReferenceData>(PlayerHandle, out var component)) { return; } if (component == null) { Log.LogError(this, "THIS WOULD HAVE CRASHED! setInteractionButtonActive(): gameObjectRef in NULL!"); return; } if (component.GameObject == null) { Log.LogError(this, "THIS WOULD HAVE CRASHED! setInteractionButtonActive(): gameObjectRef.GameObject in NULL!"); return; } ParticipationController component2 = component.GameObject.GetComponent <ParticipationController>(); if (component2 != null) { component2.PrepareParticipation(new ParticipationRequest(ParticipationRequest.Type.Prepare, Prop.gameObject, "PropUser")); } }
private void CompleteAndRemoveSequence(State state) { try { sequenceCompleted(state); } catch (Exception ex) { Log.LogError(this, ex.Message); Log.LogException(this, ex); if (state.Owner != null && state.Trigger != null) { ParticipationController component = state.Owner.GetComponent <ParticipationController>(); if (component != null) { component.ForceStopParticipation(new ParticipationRequest(ParticipationRequest.Type.Stop, state.Trigger, "ActionSequencer")); } } } finally { removeSequencer(state); } }
public Information_d_une_Activite() { InitializeComponent(); pc = new ParticipationController(); }
public Gestion_des_inscriptions() { pc = new ParticipationController(); paC = new PayaimentController(); InitializeComponent(); }
public ObservationData(ParticipationController controller, Competitor <GameObject> competitor) { Controller = controller; Competitor = competitor; IsValid = true; }