示例#1
0
    IEnumerator BattleIntroSequence()
    {
        // Turn on and off the right thingies
        battleState = BattleState.Intro;
        battleScene.SetActive(true);
        Services.battleMenuManager.ShowMenu(true);
        Services.battleMenuManager.AllowInput(true);
        Mapself.SetActive(false);
        Services.playerController.isMovementEnabled = false;

        foreach (BattleSelf battleSelf in battleSelves)
        {
            battleSelf.HP = Services.gameManager.CurrentHP;
        }

        // Move camera into position
        float duration = 1.5f;

        Camera.main.transform.DOLocalMove(battleCameraPoint.transform.localPosition, duration);
        Camera.main.transform.DOLocalRotate(battleCameraPoint.transform.localRotation.eulerAngles, duration);

        battleState = BattleState.AwaitingInput;

        yield return(null);
    }
示例#2
0
    void TurnOffBattleScene(bool moveCamera, bool setMapselfActive)
    {
        foreach (BattleSelf battleSelf in battleSelves)
        {
            battleSelf.DestroyBody();
        }
        battleScene.transform.parent        = Services.playerController.transform;
        battleScene.transform.localPosition = Vector3.zero;
        battleScene.SetActive(false);
        Mapself.SetActive(setMapselfActive);
        Services.playerController.isMovementEnabled = setMapselfActive;

        if (moveCamera)
        {
            Camera.main.transform.position = FieldCameraReference.transform.position;
            Camera.main.transform.rotation = FieldCameraReference.transform.rotation;
        }
    }