Class ObjectAssemblyPlacementTool
- Namespace
- KSP.OAB
- Assembly
- Assembly-CSharp.dll
public class ObjectAssemblyPlacementTool : ObjectAssemblyTool, IObjectAssemblyTool, IDisposable
- Inheritance
-
ObjectAssemblyPlacementTool
- Implements
-
- Derived
-
- Inherited Members
-
- Extension Methods
-
Constructors
public ObjectAssemblyPlacementTool(ObjectAssemblyBuilderEvents eventSystemToUse, ObjectAssemblyUIEvents uiEventsToUse, ObjectAssemblyInputHandler inputToUse, ObjectAssemblyPartTracker partTrackerToUse, OABSessionInformation statsToUse, ObjectAssemblyCameraManager cameraManagerToUse, ObjectAssemblyAssets oabAssets)
Parameters
eventSystemToUse ObjectAssemblyBuilderEvents
uiEventsToUse ObjectAssemblyUIEvents
inputToUse ObjectAssemblyInputHandler
partTrackerToUse ObjectAssemblyPartTracker
statsToUse OABSessionInformation
cameraManagerToUse ObjectAssemblyCameraManager
oabAssets ObjectAssemblyAssets
Fields
public const float RaycastOffset = 5
Field Value
- float
protected bool _isDragging
Field Value
- bool
protected readonly HashSet<Outline> _outlined
Field Value
- HashSet<Outline>
protected readonly HashSet<IObjectAssemblyPart> _outlinedParts
Field Value
- HashSet<IObjectAssemblyPart>
protected bool _tertiaryDown
Field Value
- bool
protected ObjectAssemblyCameraManager cameraManager
Field Value
- ObjectAssemblyCameraManager
public float cameraPannedVertically
Field Value
- float
protected IObjectAssemblyPartNode childNodeToAttach
Field Value
- IObjectAssemblyPartNode
protected bool isAligningPartToAnotherPart
Field Value
- bool
protected bool isRotating
Field Value
- bool
protected IObjectAssemblyPart lastGrabbedPart
Field Value
- IObjectAssemblyPart
protected IObjectAssembly lastMousedOverAssembly
Field Value
- IObjectAssembly
protected IObjectAssembly lastOutlinedAssembly
Field Value
- IObjectAssembly
protected ObjectAssemblyAssets oabAssets
Field Value
- ObjectAssemblyAssets
protected IObjectAssemblyPartNode parentNodeToAttach
Field Value
- IObjectAssemblyPartNode
protected IObjectAssemblyPart partPreviouslyUnderCursor
Field Value
- IObjectAssemblyPart
protected IObjectAssemblyPart partToAttachTo
Field Value
- IObjectAssemblyPart
protected ObjectAssemblyPartTracker partTracker
Field Value
- ObjectAssemblyPartTracker
public const float raycastLimit = 2000
Field Value
- float
public Vector3 rotateAxis
Field Value
- Vector3
protected OABSessionInformation stats
Field Value
- OABSessionInformation
protected ObjectAssemblyInputHandler utilInput
Field Value
- ObjectAssemblyInputHandler
Properties
protected virtual bool CanOutlineDisabledRenderers { get; }
Property Value
- bool
protected virtual bool DoOutlinesFilterNames { get; }
Property Value
- bool
public GameInstance Game { get; }
Property Value
- GameInstance
protected bool GrabbingParts { get; }
Property Value
- bool
protected IObjectAssemblyPart PartGrabbed { get; }
Property Value
- IObjectAssemblyPart
protected IObjectAssemblyPart PartUnderCursor { get; }
Property Value
- IObjectAssemblyPart
Methods
public void DetermineSuggestedRotation(IObjectAssemblyPart targetParent, IObjectAssemblyPart currentHeldChild, bool snapEnabled)
Parameters
targetParent IObjectAssemblyPart
currentHeldChild IObjectAssemblyPart
snapEnabled bool
public override void Dispose()
public GameObject FindParentWithTag(GameObject childObject, string tag)
Parameters
childObject GameObject
tag string
Returns
- GameObject
public override void GamepadRightStickPerformed()
protected void GetGrabbedNodes(List<IObjectAssemblyPartNode> grabbedNodes)
Parameters
grabbedNodes List<IObjectAssemblyPartNode>
public override void Initialize()
public void InitializeInputEvents()
protected bool IsStackAttachment(IObjectAssemblyPartNode parentNode, IObjectAssemblyPartNode childNode)
Parameters
parentNode IObjectAssemblyPartNode
childNode IObjectAssemblyPartNode
Returns
- bool
public void OnAssemblyCreatedFromUI(IObjectAssembly assembly)
Parameters
assembly IObjectAssembly
public override void OnCameraRotate()
public override void OnCameraRotateReleased()
protected virtual void OnGrabbingPart(IObjectAssemblyPart part)
Parameters
part IObjectAssemblyPart
protected virtual void OnLateUpdate()
public void OnPartDropped(IObjectAssemblyPart part)
Parameters
part IObjectAssemblyPart
protected virtual void OnPlacingPart(bool isAttachedToSomethingElse)
Parameters
isAttachedToSomethingElse bool
OnPostLateUpdate()
protected virtual void OnPostLateUpdate()
OnPostUpdate()
protected virtual void OnPostUpdate()
protected virtual void OnPreLateUpdate()
protected virtual void OnPreUpdate()
protected virtual void OnResetRotation()
protected virtual void OnUpdate()
public void PerformSurfaceOffsetAdjustment(IObjectAssemblyPart target, IObjectAssemblyPart current, Vector3 hitSpot, Vector3 hitNormal, bool snapEnabled)
Parameters
target IObjectAssemblyPart
current IObjectAssemblyPart
hitSpot Vector3
hitNormal Vector3
snapEnabled bool
PostSnapSelectionToNearbyNode(bool)
protected virtual void PostSnapSelectionToNearbyNode(bool didShow)
Parameters
didShow bool
PostSnapSelectionToSurface(bool)
protected virtual void PostSnapSelectionToSurface(bool didShow)
Parameters
didShow bool
PostSnapToSurfaceOrNode()
protected virtual void PostSnapToSurfaceOrNode()
public override void PrimaryActionClick()
public override void PrimaryActionDoubleClick()
public void RevertPartSelectionShaders()
public override void SecondaryActionUp()
public override void SectiondaryActionDown()
public override void SetOutlinedPart(IObjectAssemblyPart part, bool includeChildren)
Parameters
part IObjectAssemblyPart
includeChildren bool
public void SetPartSelectionShader(IObjectAssemblyPart part)
Parameters
part IObjectAssemblyPart
public override void SetupCursorForTool()
public static void SnapNodes(IObjectAssemblyPartNode snapTarget, IObjectAssemblyPartNode gettingSnapped)
Parameters
snapTarget IObjectAssemblyPartNode
gettingSnapped IObjectAssemblyPartNode
public override void Terminate()
public override void TertiaryActionDown()
public override void TertiaryActionUp()
protected void UpdateCameraLerp()