protected override void TakeAction()
    {
        for (int i = 0; i < resultActions.Count; i++)
        {
            switch (resultActions[i])
            {
            case ResultActionType.Deactivate:

                victims[i].GetComponent <IDeactivatable>().Deactivate();

                break;

            case ResultActionType.ActivateOnScreen:

                victims[i].GetComponent <IActivatable>().Activate();

                break;

            case ResultActionType.DeactivateOnScreen:

                NarrationController.CancelNarration();

                break;

            default:

                break;
            }
        }
    }
Exemplo n.º 2
0
    protected virtual void TakeAction()
    {
        switch (resultAction)
        {
        case ResultActionType.Deactivate:

            victim.GetComponent <ObjectWorldSpaceUI>().TurnOff();

            break;

        case ResultActionType.ActivateOnScreen:

            victim.GetComponent <TextNarration>().Activate();

            break;

        case ResultActionType.DeactivateOnScreen:

            NarrationController.CancelNarration();

            break;

        default:

            break;
        }
    }
 // Update is called once per frame
 void Update()
 {
     if (!activated && trigger.active)
     {
         activated = true;
         NarrationController.CancelNarration();
         Destroy(actionsOnAction);
     }
 }
Exemplo n.º 4
0
    public void LoadScene(string sceneName, string spawnPoint)
    {
        Instance.DisablePlayerMovementAndFlip();
        NarrationController.CancelNarration();
        Time.timeScale = 1f;

        GameObject button = GameObject.Find(spawnPoint).GetComponent <Spawner>().myButton;

        StartCoroutine(mainCanvas.GetComponent <LevelLoadingMenu>().loadNextScene(sceneName, spawnPoint, button, false));
    }
 public override void Interact()
 {
     if (!activated && flippable.timesFlipped > 0)
     {
         activated = true;
         NarrationController.CancelNarration();
         //textNarration.SetActive(false);
         Destroy(actionsOnAction);
     }
 }
Exemplo n.º 6
0
    private IEnumerator WaitThenTakeAction()
    {
        yield return(new WaitForSeconds(time));

        switch (actionType)
        {
        case Action.ClearHint:
            NarrationController.ClearHint();
            break;
        }
    }
Exemplo n.º 7
0
 private void OnTriggerEnter(Collider other)
 {
     if (other.CompareTag("Player"))
     {
         if (_target)
         {
             _target.CancelHint();
         }
         NarrationController.CancelNarration();
     }
 }
Exemplo n.º 8
0
    private void StartNarration()
    {
        NarrationController.TriggerNarration(narrationSettings, null, text);

        if (lore)
        {
            Toolbox.Instance.PlaySoundEffect(SoundBox.Instance.narrationSound);
        }
        else
        {
            Toolbox.Instance.PlaySoundEffect(SoundBox.Instance.narrationSound);
        }
    }
Exemplo n.º 9
0
 void Awake()
 {
     if (instance != null && instance != this)
     {
         Destroy(this.gameObject);
         return;
     }
     else
     {
         instance = this;
     }
     DontDestroyOnLoad(this.gameObject);
 }
Exemplo n.º 10
0
    public void Activate()
    {
        if (activateOnce)
        {
            if (!_activated)
            {
                NarrationController.TriggerHint(text,
                                                (ControlManager.GetControllerState() == ControlManager.ControllerState.JoystickPS4) ? controllerIcon : keyboardIcon);
            }
        }
        else
        {
            NarrationController.TriggerHint(text, keyboardIcon);
        }

        _activated = true;
    }
Exemplo n.º 11
0
    // Use this for initialization
    void Start()
    {
        if (_instance == null)
        {
            _instance = this;
        }
        else
        {
            Debug.LogError("There is more than one Narration Controller! Destroying this one");
            Destroy(this);
        }

        _narrationContainer = Toolbox.Instance.mainCanvas.transform.Find("TextNarration").gameObject;
        _narrationText      = _narrationContainer.GetComponentInChildren <Text>();
        _narrationText.text = "";
        _narrationAnimator  = _narrationContainer.GetComponent <Animator>();
        _narrationContinue  = _narrationContainer.transform.Find("Continue").GetComponent <Image>();
        _narrationContinue.gameObject.SetActive(false);
        _narrationBackground = _narrationContainer.transform.Find("Background").GetComponent <Image>();
        _hintController      = Toolbox.Instance.mainCanvas.transform.Find("ControlHint").GetComponent <HintController>();

        CancelNarration();
    }
Exemplo n.º 12
0
    void DoNarration()
    {
        NarrationController.TriggerNarration(narrationSettings, this, text);

        base.OnSelect();
    }
Exemplo n.º 13
0
 public void AnimationDone()
 {
     NarrationController.OpenAnimationDone();
 }
Exemplo n.º 14
0
 public void Deactivate()
 {
     NarrationController.CancelNarration();
 }
Exemplo n.º 15
0
 public void Deactivate()
 {
     NarrationController.ClearHint();
 }