18 lines
570 B
C#
18 lines
570 B
C#
using System.Numerics;
|
|
using MonoGameBlank2dStartKit.Core.Content;
|
|
using MoonTools.ECS;
|
|
|
|
namespace MonoGameBlank2dStartKit.Core;
|
|
|
|
public static class Scenarios
|
|
{
|
|
public static void Basic(World world, Assets assets)
|
|
{
|
|
var ball = world.CreateEntity();
|
|
world.Set(ball, new Position(new Vector2(10, 10)));
|
|
world.Set(ball, new Image(ImageId.Ball));
|
|
world.Set(ball, new Velocity(40f, 40f));
|
|
world.Set(ball, new Rotation(0, assets.GetTexture2D(ImageId.Ball)));
|
|
world.Set(ball, new RotationSpeed(3f, Drag: 0.03f));
|
|
}
|
|
} |