Beispiel #1
0
    public void Awake()
    {
        _characterCamera.transform.parent = null;
        _canvasOverlay.transform.SetParent(null, false);

        _rTex = new RenderTexture(512, 512, 24);
        _rTex.antiAliasing = 1;
        _rTex.wrapMode     = TextureWrapMode.Clamp;
        _rTex.filterMode   = FilterMode.Bilinear;
        _rTex.anisoLevel   = 0;

        _mrCharacterScreen.material.mainTexture = _rTex;
        _characterCamera.targetTexture          = _rTex;

        FightCamera.AdaptDialog(4096, transform);
        Hide();
    }
Beispiel #2
0
    public void Start()
    {
        //FightCamera.AdaptMain();
        FightCamera.AdaptCanvas(GameConstants.DEFAULT_RESOLUTION_WIDTH, _ui.CanvasBG);
        Utils.UI.AdaptCanvasResolution(GameConstants.DEFAULT_RESOLUTION_WIDTH, GameConstants.DEFAULT_RESOLUTION_HEIGHT, _ui.CanvasUI);

        if (_missionData == null)
        {
            //TODO: broadcast message
            Debug.LogError("Wrong mission info");
            return;
            //yield break;	//???
        }

        //yield return null;	//???

        StartFightPreparations();
    }
        public FightCameraController(IReactiveProperty <EnumBattleWindow> battleState, IPlayerView player,
                                     FightCamera camera, IReactiveProperty <EnumFightCamera> typeCameraAndCharControl)
        {
            _camera      = camera;
            _player      = player;
            _battleState = battleState;
            _typeCameraAndCharControl = typeCameraAndCharControl;

            _battleState.Subscribe(_ =>
            {
                if (_battleState.Value == EnumBattleWindow.Fight)
                {
                    _followThePlayer = true;
                }
                else
                {
                    _followThePlayer = false;
                }
            }).AddTo(_subscriptions);
            _typeCameraAndCharControl.Subscribe(_ =>
            {
                if (_typeCameraAndCharControl.Value == EnumFightCamera.TopView)
                {
                    _move = TopViewFollow;
                }

                if (_typeCameraAndCharControl.Value == EnumFightCamera.ThirdPersonView)
                {
                    _move = ThirdPersonViewFollow;
                }
            }).AddTo(_subscriptions);

            _camera.ThirdTarget = Object.Instantiate(
                new GameObject("ThirdPersonTargetCamera"),
                _player.Transform
                ).transform;
            _camera.ThirdTarget.localPosition = _camera.OffsetThirdPosition();
            _camera.TopTarget = _player.Transform;
        }
Beispiel #4
0
 /// <summary>
 /// 初期化処理
 /// </summary>
 /// <param name="camera">カメラへの参照</param>
 public void Initialize(FightCamera camera)
 {
     m_camera = camera;
 }