Exemple #1
0
    // Start is called before the first frame update
    public virtual void Init(ActPlayerController controller)
    {
        _camera        = GetComponent <Camera>();
        isFollowPlayer = true;
        _currentZoom   = MinimumZoom;

        if (controller.Pawn == null)
        {
            return;
        }
        AssignTarget(controller.Pawn);

        //
        if (OldGameMain.GetInstance().gameMode != null)
        {
            _levelBounds = OldGameMain.GetInstance().gameMode.GetLevelBound();
        }

        _lastTargetPosition = Target.position;
        _offsetZ            = (transform.position - Target.position).z;
        transform.parent    = null;
        if (PixelPerfect)
        {
        }
        else
        {
            Zoom();
        }
    }
    public void Init()
    {
        map     = new Map();
        HudRoot = new ActHud();
        HudRoot.BindView(GameObject.Find("Hud").transform);

        playerController = GameObject.Find("Player").GetComponent <ActPlayerController>();
    }