This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BenchmarkDotNet.Attributes; | |
using NVector3 = System.Numerics.Vector3; | |
using SVector3 = Stride.Core.Mathematics.Vector3; | |
using MVector3 = Microsoft.Xna.Framework.Vector3; | |
using MMatrix = Microsoft.Xna.Framework.Matrix; | |
using NMatrix = System.Numerics.Matrix4x4; | |
using SMatrix = Stride.Core.Mathematics.Matrix; | |
using NQuaternion = System.Numerics.Quaternion; | |
using MQuaternion = Microsoft.Xna.Framework.Quaternion; | |
using SQuaternion = Stride.Core.Mathematics.Quaternion; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using BepuPhysics; | |
using BepuPhysics.Collidables; | |
using BepuPhysics.CollisionDetection; | |
using Stride.BepuPhysics.Components; | |
using Stride.BepuPhysics.Definitions; | |
using Stride.BepuPhysics.Definitions.Contacts; | |
using Stride.Core; | |
using Stride.Core.Extensions; | |
using Stride.Core.Mathematics; | |
using Stride.Engine; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ComponentCategory("Utils")] | |
[DataContract("SmoothFollowAndRotate")] | |
public class SmoothFollowAndRotate : SyncScript | |
{ | |
public Entity EntityToFollow { get; set; } | |
public float Speed { get; set; } = 1; | |
public override void Update() | |
{ | |
var deltaTime = (float)Game.UpdateTime.Elapsed.TotalSeconds; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Stride.Games; | |
using Stride.Rendering; | |
using System; | |
using Stride.Core.Serialization; | |
using Stride.Core; | |
using Stride.Physics; | |
using System.Collections.Generic; | |
using Stride.Core.Mathematics; | |
public static class MeshExtensions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using MagicAndMight.Code.Core.Extensions; | |
using Stride.Core; | |
using Stride.Core.Mathematics; | |
using Stride.Engine; | |
namespace MagicAndMight.Code.Core.Utils; | |
[DataContract(nameof(SmoothRotate))] | |
[ComponentCategory("Utils")] | |
public class SmoothRotate : SyncScript |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DataContract(nameof(SmoothFollow))] | |
[ComponentCategory("Animation")] | |
public class SmoothFollow : SyncScript | |
{ | |
public Entity EntityToFollow { get; set; } | |
public Vector3 Speed { get; set; } = new Vector3(1, 1, 1); | |
public override void Update() | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using ImmoApocalypse.Code.Core.Structs; | |
using Stride.Core; | |
using Stride.Engine; | |
using System; | |
using System.Windows.Media.Animation; | |
namespace Core; | |
[DataContract(nameof(AnimationEvent))] | |
[AllowMultipleComponents] |