protected virtual void start()
 {
     if (Image != null)
     {
         defaultSprite = Image.sprite;
         defaultColor  = Image.color;
     }
     accessibilityComponents = GetComponentsInChildren <AccessibilitySettings>();
     disablerManager         = Service.Get <UIElementDisablerManager>();
     disablerManager.RegisterDisabler(this);
 }
Exemple #2
0
 private void Start()
 {
     disablerManager = Service.Get <UIElementDisablerManager>();
     disablerManager.RegisterDisablerGroup(this);
     groupElementsList.AddRange(ElementsInGroup);
     if (IncludeAllChildren)
     {
         UIElementDisabler[] componentsInChildren = GetComponentsInChildren <UIElementDisabler>();
         groupElementsList.AddRange(componentsInChildren);
     }
 }
    protected override void Awake()
    {
        eventDispatcher = Service.Get <EventDispatcher>();
        disablerManager = Service.Get <UIElementDisablerManager>();
        CPDataEntityCollection cPDataEntityCollection = Service.Get <CPDataEntityCollection>();

        if (cPDataEntityCollection.TryGetComponent(cPDataEntityCollection.LocalPlayerHandle, out GameObjectReferenceData component) && component.GameObject != null)
        {
            identifiedLocalPlayer(component.GameObject);
        }
        base.Awake();
    }
Exemple #4
0
        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();
        }