예제 #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;
        }
 public void Disable()
 {
     entityInformationView.SetActive(false);
     EntityDeselected();
     entityInformationView.SetCurrentEntity(null);
     OnDisable?.Invoke();
 }
예제 #3
0
 private void Disable()
 {
     Containers[group.SelectedButton.ID].Active = false;
     Containers[group.SelectedButton.ID].DeFocus();
     group.UnlockSelected();
     OnDisable?.Invoke();
 }
예제 #4
0
 public void SetInActive()
 {
     setInactiveDelegate(this);
     if (active)
     {
         OnDisable?.Invoke(this);
     }
     active = false;
 }
예제 #5
0
 // Start is called before the first frame update
 void Start()
 {
     DisableButton.onClick.AddListener(() =>
     {
         GetComponent <Prototype>().ReturnToPool();
         OnDisable?.Invoke();
         OnDisable = null;
     });
 }
예제 #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);
         }
     }
 }
예제 #8
0
 public void Switch()
 {
     if (select == ESelect.DISABLE)
     {
         select = ESelect.ENABLE;
         OnEnable?.Invoke(entity);
     }
     else
     {
         select = ESelect.DISABLE;
         OnDisable?.Invoke(entity);
     }
 }
예제 #9
0
파일: Object.cs 프로젝트: yuu0123/EscapeRun
    private void Update()
    {
        if (isActive)
        {
            gameObject.transform.Translate(0, 0, -0.1f);

            if (gameObject.transform.position.z < -5)
            {
                SetIsActive(false);
                OnDisable?.Invoke();
            }
        }
    }
예제 #10
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
                ));
 }
예제 #11
0
    void Update()
    {
        if (isActive)
        {
            gameObject.transform.Translate(0, 0, -0.05f);

            if (gameObject.transform.position.z < -5)
            {
                isActive = false;
                OnDisable?.Invoke();
            }
        }
    }
예제 #12
0
 public void Disable()
 {
     IsEnabled = false;
     OnDisable.Invoke();
 }
예제 #13
0
 public void Disable()
 {
     OnDisable?.Invoke();
 }
예제 #14
0
파일: Input.cs 프로젝트: MrDebil/Game
    public void Disable()
    {
        _isActiveInput = false;

        OnDisable?.Invoke();
    }
예제 #15
0
 /// <summary>
 /// Call this to disable the cube
 /// </summary>
 public void Disable()
 {
     OnDisable?.Invoke(this);
     gameObject.SetActive(false);
 }