Example #1
0
 public void Rotate()
 {
     if (rotatable != null)
     {
         // Obtains the new 90-degrees clockwise orientation of the current orientation.
         rotatable.RotateBy(1);
     }
 }
Example #2
0
 public virtual void ServerPerformInteraction(HandApply interaction)
 {
     if (Validations.HasItemTrait(interaction.UsedObject, CommonTraits.Instance.Wrench))
     {
         var metaDataNode    = registerItem.Matrix.MetaDataLayer.Get(registerItem.LocalPositionServer);
         var connectionsCopy = GetConnections();
         int offset          = PipeFunctions.GetOffsetAngle(transform.localEulerAngles.z);
         connectionsCopy.Rotate(offset);
         if (PipeTile.CanAddPipe(metaDataNode, connectionsCopy) == false)
         {
             return;
         }
         ToolUtils.ServerPlayToolSound(interaction);
         BuildPipe();
     }
     else
     {
         rotatable.RotateBy(1);
     }
 }
Example #3
0
 public void Rotate()
 {
     if (rotatable != null)
     {
         // Obtains the new 90-degrees clockwise orientation of the current orientation.
         rotatable.RotateBy(1);
     }
     else
     {
         transform.Rotate(0, 0, -90);
         SyncRotation(zRotation, transform.eulerAngles.z);
     }
 }