Esempio n. 1
0
	/// <summary>
	/// As per IMatrixRotate interface - called when matrix is rotated, updates drawer orientation.
	/// </summary>
	public void OnMatrixRotate(MatrixRotationInfo rotationInfo)
	{
		if (rotationInfo.IsClientside) return;
		if (!rotationInfo.IsEnding) return;

		drawerOrientation = directional.CurrentDirection;
	}
Esempio n. 2
0
 private void OnMatrixRotate(MatrixRotationInfo arg0)
 {
     if (progressActionConfig.AllowMovement == true)
     {
         return;
     }
     InterruptProgress("cross-matrix and target or performer matrix rotated");
 }
Esempio n. 3
0
 private void OnRotationEnd(MatrixRotationInfo info)
 {
     if (info.IsClientside && info.IsEnding)
     {
         //reset orientation to upright
         transform.rotation = Quaternion.identity;
     }
 }
Esempio n. 4
0
 public void OnMatrixRotate(MatrixRotationInfo rotationInfo)
 {
     if (rotationInfo.IsClientside)
     {
         //cache the upwards direction so we can use it to determine angle offset during a matrix rotation
         upVectorForRotation = transform.up;
     }
 }
Esempio n. 5
0
 private void OnRotate(MatrixRotationInfo info)
 {
     if (info.IsEnding || info.IsObjectBeingRegistered)
     {
         RotationOffset = info.RotationOffsetFromInitial;
         Logger.LogTraceFormat("{0} layer redrawing with offset {1}", Category.Matrix, info.MatrixMove, RotationOffset);
         tilemap.RefreshAllTiles();
     }
 }
Esempio n. 6
0
 private void OnRotate(MatrixRotationInfo info)
 {
     if (matrixRotationHooks == null)
     {
         return;
     }
     //pass rotation event on to our children
     foreach (var matrixRotationHook in matrixRotationHooks)
     {
         matrixRotationHook.OnMatrixRotate(info);
     }
 }
Esempio n. 7
0
 public void InitFromMatrix()
 {
     RotationOffset = RotationOffset.Same;
     matrixMove     = transform.root.GetComponent <MatrixMove>();
     if (matrixMove != null)
     {
         Logger.LogTraceFormat("{0} layer initializing from matrix", Category.Matrix, matrixMove);
         matrixMove.MatrixMoveEvents.OnRotate.AddListener(OnRotate);
         //initialize from current rotation
         OnRotate(MatrixRotationInfo.FromInitialRotation(matrixMove, NetworkSide.Client, RotationEvent.Register));
     }
 }
Esempio n. 8
0
    /// <summary>
    /// As per IMatrixRotate interface - called when matrix is rotated, updates drawer orientation.
    /// </summary>
    public void OnMatrixRotate(MatrixRotationInfo rotationInfo)
    {
        Debug.Log("OnMatrixRotate()");
        if (rotationInfo.IsClientside)
        {
            return;
        }
        if (!rotationInfo.IsEnding)
        {
            return;
        }

        drawerOrientation = directional.CurrentDirection;
    }
Esempio n. 9
0
 public void OnMatrixRotate(MatrixRotationInfo rotationInfo)
 {
     //We need to handle lighting stuff for matrix rotations for local player:
     if (PlayerManager.LocalPlayer == gameObject && rotationInfo.IsClientside)
     {
         if (rotationInfo.IsStarting)
         {
             Camera2DFollow.followControl.lightingSystem.matrixRotationMode = true;
         }
         else if (rotationInfo.IsEnding)
         {
             Camera2DFollow.followControl.lightingSystem.matrixRotationMode = false;
         }
     }
 }
Esempio n. 10
0
 public void OnMatrixRotate(MatrixRotationInfo rotationInfo)
 {
 }
Esempio n. 11
0
 private void OnMatrixRotate(MatrixRotationInfo arg0)
 {
     InterruptProgress("cross-matrix and target or performer matrix rotated");
 }
Esempio n. 12
0
    //Rotates FX as ship rotates
    public void RotateFX(MatrixRotationInfo info)
    {
        var mainFX = particleFX.main;

        //mainFX.startRotation = newRotationOffset.Degree * Mathf.Deg2Rad;
    }
Esempio n. 13
0
 private void OnTargetMatrixRotate(MatrixRotationInfo arg0)
 {
     InterruptProgress();
 }