public virtual void ShapeMovedToNewAnchorPosition(BoardPosition newAnchorPosition)
 {
     if (this.PrimaryShape == null)
     {
         return;
     }
     this.MyTransform.position = HACK_BoardLayoutManager.GetLayoutManager().GetWorldCenterPositionForBoardPositionWithWeird(newAnchorPosition);
 }
    public override void ShapeMovedToNewAnchorPosition(BoardPosition newAnchorPosition)
    {
        if (this.PrimaryShape == null)
        {
            return;
        }
        Vector3 positionWithWeird = HACK_BoardLayoutManager.GetLayoutManager().GetWorldCenterPositionForBoardPositionWithWeird(newAnchorPosition);

        if (this.ShapeDropInterpActive)
        {
            this.ShapeDropInterpTargetPosition = positionWithWeird;
        }
        else
        {
            this.MyTransform.position = positionWithWeird;
        }
    }
Exemple #3
0
    public bool GetCameraPositionForBoardPosition(BoardPosition pos, ref Vector3 result)
    {
        bool flag = false;

        result = Vector3.zero;
        if (this.ActiveBoard != null)
        {
            BoardPosition pos1 = pos;
            if (this.ActiveBoard.CreateSafeBoardPosition(ref pos1))
            {
                result = HACK_BoardLayoutManager.GetLayoutManager().GetWorldCenterPositionForBoardPositionWithWeird(pos1);
                flag   = true;
            }
        }
        else
        {
            Debug.LogWarning((object)"Tried to GetCameraPositionForBoardPosition() when no ActiveBoard set");
        }
        return(flag);
    }
Exemple #4
0
    private void TickCameraMovement(float dt)
    {
        if (!this.InterpActive)
        {
            return;
        }
        float num = 0.2f;

        if ((double)this.InterpDuration > 0.0)
        {
            num = this.InterpDuration;
        }
        this.InterpProgressTime += dt;
        if ((double)this.InterpProgressTime > (double)num)
        {
            this.InterpProgressTime = num;
            this.InterpActive       = false;
            this.InterpDuration     = -1f;
        }
        //this.ViewingCamera.transform.position = new Vector3(InterpHelpers.Smerp(this.StartCamearDest.x, this.NewCameraDest.x, this.InterpProgressTime / num), InterpHelpers.Smerp(this.StartCamearDest.y, this.NewCameraDest.y, this.InterpProgressTime / num), this.NewCameraDest.z);
        HACK_BoardLayoutManager.GetLayoutManager().NotifyCameraMovedToFixupLocation(new BoardPosition(0, 0, 0), this.ViewingCamera.transform.position);
    }