better sway, exe customizations + logo
This commit is contained in:
@@ -13,7 +13,7 @@ public class Game : GameModule
|
||||
|
||||
// C#-only scripting
|
||||
BuildCSharp = true;
|
||||
BuildNativeCode = false;
|
||||
BuildNativeCode = true;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
@@ -25,7 +25,6 @@ public class Game : GameModule
|
||||
|
||||
options.PublicDependencies.Add("FidelityFXFSR");
|
||||
|
||||
|
||||
base.Setup(options);
|
||||
|
||||
// Here you can modify the build options for your game module
|
||||
|
||||
@@ -195,7 +195,43 @@ namespace Game
|
||||
//easeInQuad
|
||||
|
||||
Quaternion rotation = GetRotation();
|
||||
Actor.LocalOrientation = Quaternion.Lerp(Actor.LocalOrientation, rotation, Math.Min(1.0f, easeInCubic(swaySpeed * Time.DeltaTime)));
|
||||
|
||||
Vector3 targetAngles = rotation.EulerAngles;
|
||||
Vector3 angles = Actor.LocalOrientation.EulerAngles;
|
||||
|
||||
float swaySpeedScaled = swaySpeed * Time.DeltaTime;
|
||||
const float maxAngle = 30f;
|
||||
|
||||
float deltaX = Mathf.DeltaAngle(angles.X, targetAngles.X);
|
||||
float deltaY = Mathf.DeltaAngle(angles.Y, targetAngles.Y);
|
||||
float deltaZ = Mathf.DeltaAngle(angles.Z, targetAngles.Z);
|
||||
if (deltaX > maxAngle)
|
||||
angles.X -= maxAngle - deltaX;
|
||||
else if (deltaX < -maxAngle)
|
||||
angles.X += maxAngle + deltaX;
|
||||
if (deltaY > maxAngle)
|
||||
angles.Y -= maxAngle - deltaY;
|
||||
else if (deltaY < -maxAngle)
|
||||
angles.Y += maxAngle + deltaY;
|
||||
if (deltaZ > maxAngle)
|
||||
angles.Z -= maxAngle - deltaZ;
|
||||
else if (deltaZ < -maxAngle)
|
||||
angles.Z += maxAngle + deltaZ;
|
||||
|
||||
float percX = Mathf.Abs(deltaX) / maxAngle;
|
||||
float percY = Mathf.Abs(deltaY) / maxAngle;
|
||||
float percZ = Mathf.Abs(deltaZ) / maxAngle;
|
||||
float minSpeed = swaySpeedScaled * 0.00001f;
|
||||
|
||||
Func<float, float> fun = (f) => f*f;
|
||||
|
||||
angles.X = Mathf.MoveTowardsAngle(angles.X, targetAngles.X, Math.Max(swaySpeedScaled*fun(percX), minSpeed));
|
||||
angles.Y = Mathf.MoveTowardsAngle(angles.Y, targetAngles.Y, Math.Max(swaySpeedScaled*fun(percY), minSpeed));
|
||||
angles.Z = Mathf.MoveTowardsAngle(angles.Z, targetAngles.Z, Math.Max(swaySpeedScaled*fun(percZ), minSpeed));
|
||||
//Actor.LocalOrientation = Quaternion.Lerp(Actor.LocalOrientation, rotation, Math.Min(1.0f, easeInCubic(swaySpeed * (1.0f/120f))));
|
||||
|
||||
Actor.LocalOrientation = Quaternion.Euler(angles);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,15 +7,22 @@ public class GameTarget : GameProjectTarget
|
||||
{
|
||||
base.Init();
|
||||
|
||||
//OutputName = "Goake";
|
||||
|
||||
// Reference the modules for game
|
||||
Modules.Add("Game");
|
||||
Modules.Add("FidelityFXFSR");
|
||||
|
||||
//Modules.Add("Cabrito");
|
||||
OutputName = "Goake";
|
||||
Win32ResourceFile = @"C:\dev\GoakeFlax\Source\goake.rc";
|
||||
IsPreBuilt = false;
|
||||
Architectures = new TargetArchitecture[] { TargetArchitecture.x64 };
|
||||
Platforms = new TargetPlatform[] { TargetPlatform.Windows };
|
||||
|
||||
LinkType = TargetLinkType.Monolithic;
|
||||
|
||||
if (LinkType == TargetLinkType.Monolithic)
|
||||
{
|
||||
Modules.Add("Main");
|
||||
OutputType = TargetOutputType.Executable;
|
||||
}
|
||||
|
||||
Modules.Add("Game");
|
||||
Modules.Add("FidelityFXFSR");
|
||||
}
|
||||
}
|
||||
|
||||
36
Source/Goake.rc
Normal file
36
Source/Goake.rc
Normal file
@@ -0,0 +1,36 @@
|
||||
#include "Game.Gen.h"
|
||||
#include "resource.h"
|
||||
|
||||
IDR_MAINFRAME ICON "Icon.ico"
|
||||
|
||||
1 VERSIONINFO
|
||||
FILEVERSION GAME_VERSION_MAJOR,GAME_VERSION_MINOR,GAME_VERSION_BUILD
|
||||
PRODUCTVERSION GAME_VERSION_MAJOR,GAME_VERSION_MINOR,GAME_VERSION_BUILD
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040004b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", GAME_COMPANY
|
||||
VALUE "FileDescription", GAME_NAME
|
||||
VALUE "FileVersion", GAME_VERSION_TEXT
|
||||
VALUE "InternalName", GAME_NAME
|
||||
VALUE "LegalCopyright", GAME_COPYRIGHT
|
||||
VALUE "ProductName", GAME_NAME
|
||||
VALUE "ProductVersion", GAME_VERSION_TEXT
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x400, 1200
|
||||
END
|
||||
END
|
||||
Reference in New Issue
Block a user