コード例 #1
0
 public void NotifyClosestActivator(UIActivator activator)
 {
     if (this._activator != activator)
     {
         ProcessActivator(activator);
     }
 }
コード例 #2
0
 private void ChangeActiveUIElement(UIActivator newUIElement)
 {
     while (newUIElement.enabled = false)
     {
         newUIElement = newUIElement.UpActivator;
     }
     currentActivator.AppearanceChanger.SetInactive();
     currentActivator = newUIElement;
     currentActivator.AppearanceChanger.SetActive();
     cooldown = CooldownDuration;
 }
コード例 #3
0
 private void OnEnable()
 {
     if (!currentActivator)
     {
         currentActivator = GetComponentInChildren <UIActivator>();
     }
     if (currentActivator.AppearanceChanger == null)
     {
         currentActivator.AppearanceChanger = currentActivator.GetComponent <UIAppearanceChanger>();
     }
     currentActivator.AppearanceChanger.SetActive();
 }
コード例 #4
0
        // Methods
        protected override void Build()
        {
            // Get GameObjects
            Prefab      = PrefabUtils.CopyPrefab(BaseItem);
            Prefab.name = NamePrefix + Name;

            GameObject uiAct = Prefab.transform.Find("techActivator/triggerActivate").gameObject;

            // Load Components
            LandPlot    plot      = Prefab.GetComponent <LandPlot>();
            UIActivator activator = uiAct.GetComponent <UIActivator>();

            // Setup Components
            plot.typeId        = ID;
            activator.uiPrefab = UIPrefab ?? activator.uiPrefab;
        }
コード例 #5
0
 private void ProcessActivator(UIActivator activator)
 {
     if (!this.isActiveAndEnabled)
     {
         return;
     }
     if (GetUnsignedWorldPointActivationVolumeDistance(activator.transform.position)
         < this.transform.InverseTransformVector(Vector3.up * activator.WorldRadius).magnitude)
     {
         _activator = activator;
     }
     else
     {
         _activator = null;
     }
 }
コード例 #6
0
ファイル: PressableUIManager.cs プロジェクト: ccdump/Paint-1
 public void Clear()
 {
     activator = null; distance = float.PositiveInfinity;
 }
コード例 #7
0
ファイル: UIActivator.cs プロジェクト: fengqk/Art
	bool GetObjectValue (GameObject obj, UIActivator objActivator)
	{
		UIActivator activator = objActivator;
		if (activator != null)
		{
			activator.Update();
			return activator.mLastState;
		}
		else
		{
			return obj.activeSelf;
		}
	}