Refactor engine to support double-precision vectors
This commit is contained in:
@@ -161,7 +161,7 @@ namespace FlaxEditor.Surface
|
||||
RootControl = rootControl ?? throw new ArgumentNullException(nameof(rootControl));
|
||||
|
||||
// Set initial scale to provide nice zoom in effect on startup
|
||||
RootControl.Scale = new Vector2(0.5f);
|
||||
RootControl.Scale = new Float2(0.5f);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -333,7 +333,7 @@ namespace FlaxEditor.Surface
|
||||
/// <param name="customValues">The custom values array. Must match node archetype <see cref="NodeArchetype.DefaultValues"/> size. Pass null to use default values.</param>
|
||||
/// <param name="beforeSpawned">The custom callback action to call after node creation but just before invoking spawn event. Can be used to initialize custom node data.</param>
|
||||
/// <returns>Created node.</returns>
|
||||
public SurfaceNode SpawnNode(ushort groupID, ushort typeID, Vector2 location, object[] customValues = null, Action<SurfaceNode> beforeSpawned = null)
|
||||
public SurfaceNode SpawnNode(ushort groupID, ushort typeID, Float2 location, object[] customValues = null, Action<SurfaceNode> beforeSpawned = null)
|
||||
{
|
||||
var nodeArchetypes = _surface?.NodeArchetypes ?? NodeFactory.DefaultGroups;
|
||||
if (NodeFactory.GetArchetype(nodeArchetypes, groupID, typeID, out var groupArchetype, out var nodeArchetype))
|
||||
@@ -352,7 +352,7 @@ namespace FlaxEditor.Surface
|
||||
/// <param name="customValues">The custom values array. Must match node archetype <see cref="NodeArchetype.DefaultValues"/> size. Pass null to use default values.</param>
|
||||
/// <param name="beforeSpawned">The custom callback action to call after node creation but just before invoking spawn event. Can be used to initialize custom node data.</param>
|
||||
/// <returns>Created node.</returns>
|
||||
public SurfaceNode SpawnNode(GroupArchetype groupArchetype, NodeArchetype nodeArchetype, Vector2 location, object[] customValues = null, Action<SurfaceNode> beforeSpawned = null)
|
||||
public SurfaceNode SpawnNode(GroupArchetype groupArchetype, NodeArchetype nodeArchetype, Float2 location, object[] customValues = null, Action<SurfaceNode> beforeSpawned = null)
|
||||
{
|
||||
if (groupArchetype == null || nodeArchetype == null)
|
||||
throw new ArgumentNullException();
|
||||
|
||||
Reference in New Issue
Block a user