Ejemplo n.º 1
0
        public override void OnUpdate()
        {
            if (Input.GetKeyUp(Key))
            {
                State = !State;
            }

            if (State && !prevState)
            {
                OnEnable?.Invoke();
                OnToggle?.Invoke();
            }
            else if (!State && prevState)
            {
                OnDisable?.Invoke();
                OnToggle?.Invoke();
            }


            if (State)
            {
                Funky?.Invoke();
            }

            prevState = State;
        }
Ejemplo n.º 2
0
 private void Disable()
 {
     Containers[group.SelectedButton.ID].Active = false;
     Containers[group.SelectedButton.ID].DeFocus();
     group.UnlockSelected();
     OnDisable?.Invoke();
 }
 public void Disable()
 {
     entityInformationView.SetActive(false);
     EntityDeselected();
     entityInformationView.SetCurrentEntity(null);
     OnDisable?.Invoke();
 }
Ejemplo n.º 4
0
 // Start is called before the first frame update
 void Start()
 {
     DisableButton.onClick.AddListener(() =>
     {
         GetComponent <Prototype>().ReturnToPool();
         OnDisable?.Invoke();
         OnDisable = null;
     });
 }
Ejemplo n.º 5
0
 public void SetInActive()
 {
     setInactiveDelegate(this);
     if (active)
     {
         OnDisable?.Invoke(this);
     }
     active = false;
 }
Ejemplo n.º 6
0
 void Start()
 {
     DisableButton.onClick.AddListener(() =>
     {
         gameObject.SetActive(false);
         OnDisable?.Invoke();
         OnDisable = null;
     });
     //gameObject.SetActive(false);
 }
 private void OnBecameInvisible()
 {
     if (transform != null)
     {
         if (transform.position.y < Camera.main.ScreenToWorldPoint(Vector3.zero).y)
         {
             OnDisable?.Invoke();
             gameObject.SetActive(false);
         }
     }
 }
Ejemplo n.º 8
0
 private ApplicationLauncherButton BuildButton()
 {
     return(ApplicationLauncher.Instance.AddModApplication(
                onTrue: () => OnEnable?.Invoke(),
                onFalse: () => OnDisable?.Invoke(),
                onHover: null,
                onHoverOut: null,
                onEnable: null,
                onDisable: null,
                visibleInScenes: ApplicationLauncher.AppScenes.ALWAYS,          /* MAPVIEW does not work in 1.2.2 */
                texture: m_texture
                ));
 }
Ejemplo n.º 9
0
    void Update()
    {
        if (isActive)
        {
            gameObject.transform.Translate(0, 0, -0.05f);

            if (gameObject.transform.position.z < -5)
            {
                isActive = false;
                OnDisable?.Invoke();
            }
        }
    }
Ejemplo n.º 10
0
 public void Switch()
 {
     if (select == ESelect.DISABLE)
     {
         select = ESelect.ENABLE;
         OnEnable?.Invoke(entity);
     }
     else
     {
         select = ESelect.DISABLE;
         OnDisable?.Invoke(entity);
     }
 }
Ejemplo n.º 11
0
    private void Update()
    {
        if (isActive)
        {
            gameObject.transform.Translate(0, 0, -0.1f);

            if (gameObject.transform.position.z < -5)
            {
                SetIsActive(false);
                OnDisable?.Invoke();
            }
        }
    }
Ejemplo n.º 12
0
 public Perk(string name, string description, int inheritIDs, float x, float y, PerkCategory category, float size, int levelRequirement, OnApply applyMethods, OnDisable disableMethods)
 {
     Name             = name;
     Description      = description;
     InheritIDs       = new int[] { inheritIDs };
     PosOffsetX       = x;
     PosOffsetY       = y;
     Category         = category;
     Size             = size;
     Endless          = false;
     LevelRequirement = levelRequirement;
     ApplyMethods     = applyMethods;
     DisableMethods   = disableMethods;
     ID      = AllPerks.Count;
     Applied = false;
     AllPerks.Add(this);
 }
Ejemplo n.º 13
0
 public void Disable()
 {
     IsEnabled = false;
     OnDisable.Invoke();
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Call this to disable the cube
 /// </summary>
 public void Disable()
 {
     OnDisable?.Invoke(this);
     gameObject.SetActive(false);
 }
Ejemplo n.º 15
0
        public void OpenCheatTriggerForm(OnDisable onDisable)
        {
            Singleton <CUIManager> .GetInstance().OpenForm(s_cheatTriggerFormPath, false, false);

            this.m_onDisable = onDisable;
        }
Ejemplo n.º 16
0
    public void Disable()
    {
        _isActiveInput = false;

        OnDisable?.Invoke();
    }
Ejemplo n.º 17
0
 public void Disable()
 {
     OnDisable?.Invoke();
 }