// Start is called before the first frame update
 void Awake()
 {
     nextLevel = GetComponent <NextLevelTrigger>();
     data      = new NextLevelTriggerObjectData {
         triggers = nextLevel.requiredConditionsState
     };                                                                                     //get/set
 }
    public override void setLoadData(object obj)
    {
        if (nextLevel == null)
        {
            nextLevel = GetComponent <NextLevelTrigger>();
        }

        data = (NextLevelTriggerObjectData)obj;
        nextLevel.requiredConditionsState = data.triggers;
        Debug.Log("data.triggers:" + data.triggers);
    }
Exemplo n.º 3
0
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        // trigger success dialog
        // at end of dialog open gate / shine light for next area
        Dialog dialog = FindObjectOfType <BossController>().SuccessDialog;

        FindObjectOfType <GameStateManager>().DisableMovement = true;
        _dialogManager            = DialogManager.Instance;
        _dialogManager.EndBattle += StartLoadingNewScene;
        _sceneLoader              = FindObjectOfType <NextLevelTrigger>();
        _sceneLoader.Active       = true;
        FindObjectOfType <DialogManager>().StartDialog(dialog, "END");
    }