Ejemplo n.º 1
0
    public void MoveToNextStep()
    {
        UnityEngine.Debug.Log("Move to next step " + _stepCount);
        switch (++_stepCount)
        {
        case (int)IntroState.BOAT_ENTRANCE:
            boatController.BindToIntro(this);
            boatController.StartIntro();

            _gameCamera.EnableBoundary(true);
            _humanPlayerController.playerMotion.SetMovement(false);
            break;

        case (int)IntroState.ORC_ENTRANCE:
            boatController.StopIntro();
            _gameCamera.EnableBoundary(false);
            ((OrcMotion)_orcPlayerController.playerMotion).GetComponent <SpriteRenderer>().sortingLayerName = "Orc";
            break;

        case (int)IntroState.END:
            _gameCamera.EnableBoundary(true);
            _orcPlayerController.playerMotion.SetMovement(false);
            StopIntro();
            break;

        default:
            MoveToNextStep();
            break;
        }
    }
Ejemplo n.º 2
0
    private void Awake()
    {
        GameObject human = GameObject.FindWithTag(PlayerTag.HUMAN.ToString());
        GameObject orc   = GameObject.FindWithTag(PlayerTag.ORC.ToString());

        _humanPlayerController = human.GetComponent <PlayerController>();
        _orcPlayerController   = orc.GetComponent <PlayerController>();
        _gameCamera            = Camera.main.GetComponent <GameCamera>();

        _gameCamera.EnableBoundary(false);
    }