示例#1
0
    public void BeginDecision(EaseMoveTo MovementComponent)
    {
        MovementComponent.SmoothTransport(new Trans(transform));
        CurrentMovement = MovementComponent;

        if (OnBeginDecision != null)
        {
            OnBeginDecision.Invoke();
        }
    }
示例#2
0
    public void ShowZoomDetail()
    {
        if (CurrentDetail != this)
        {
            //Lazy loading
            if (bPendingInitialization)
            {
                Initialize();
            }

            //Close any open zoom detail that cannot be open when other one is
            if (CurrentDetail && CurrentDetail.CloseOnExternalActivation)
            {
                CurrentDetail.ExitZoomDetail();
            }

            //Setup
            CurrentDetail = this;
            if (ExitTransform == null)
            {
                ExitPoint = new Trans(MyManager.Instance.playerGameObject.transform);
            }
            else
            {
                ExitPoint = new Trans(ExitTransform);
            }

            //Queue smooth transport
            _playerObject.SmoothTransport(new Trans(TargetPosition ? TargetPosition : gameObject.transform), EaseMoveTo.DefaultSmoothTime, null, !ShouldForceRotation);

            if (ZoomCanvas)
            {
                ZoomCanvas.SetActive(true);
            }

            if (OnShown != null)
            {
                OnShown.Invoke();
            }
        }
    }
示例#3
0
    private void AfterFadeoutContinueFlowerCinematic()
    {
        //First move the character
        MyManager.Instance.playerGameObject.transform.position    = FlowerPosition.position;
        MyManager.Instance.playerGameObject.transform.eulerAngles = FlowerPosition.eulerAngles;

        //Second start the fade in
        MyManager.Instance.FadeIn();

        //Third, begin the smooth movement on the bee
        Bee.SmoothTransport(new Trans(BeeFlowerTarget), -1.0f, OnBeeReachedFlower);
    }
    /// <summary>
    /// Activates this hotspot, setting it as the currently active one. Sends OnDeactivate messages to any hotspot that was activated previously
    /// </summary>
    public void Activate()
    {
        if (bNeedsInitialize)
        {
            Initialize();
        }

        //Disable any hotspot currently running
        if (RequiresFlush && ActiveHotspots.Count > 0)
        {
            HotspotMovement.Flush();
        }

        //Move the character and register
        _playerObject.SmoothTransport(new Trans(PositionOverride ? PositionOverride : gameObject.transform), -1, null, true);
        HotspotMovement.RegisterActiveHotspot(this);

        //Call event dispatcher
        if (OnActivated != null)
        {
            OnActivated.Invoke();
        }
    }