Exemple #1
0
    void OnMouseUp()
    {
        //hide action wheel and call corresponding functions depending on the action
        ActionWheelController.displayActionWheel = false;

        GameController.Action();
    }
Exemple #2
0
    public void Activate()
    {
        switch (InteractionType)
        {
        case InteractionTypeEnum.Basic:
            if (HideGameobjectOnGoingInactive)
            {
                this.gameObject.SetActive(false);
            }
            else if (HideColliderOnGoingInactive)
            {
                this.gameObject.GetComponent <Collider2D>().enabled = false;
            }
            _gameController.Action(ActivateAction, this.gameObject);
            break;

        case InteractionTypeEnum.Toggleable:
            _Status = !_Status;
            _gameController.Action((_Status ? ActivateAction : DeactivateAction), this.gameObject);
            break;
        }
    }