mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-26 00:45:20 +00:00
* artemis ecs * Working on StarWarrior * Refactor for bugs * demo works :) * Fix pool bug * Fix string typo * ObjectPool garbage optimization * Aspect attribute * Remove BigInteger * Fix demo * Refactor for events * wip on platformer demo * Fix typo
24 lines
534 B
C#
24 lines
534 B
C#
using System;
|
|
using MonoGame.Extended.Entities;
|
|
|
|
namespace Demo.Platformer.Entities.Components
|
|
{
|
|
[EntityComponent]
|
|
[EntityComponentPool(InitialSize = 1)]
|
|
public class PlayerComponent : EntityComponent
|
|
{
|
|
public float WalkSpeed { get; set; }
|
|
public float JumpSpeed { get; set; }
|
|
public bool IsJumping { get; set; }
|
|
|
|
public override void Reset()
|
|
{
|
|
base.Reset();
|
|
|
|
WalkSpeed = 0;
|
|
JumpSpeed = 0;
|
|
IsJumping = false;
|
|
}
|
|
}
|
|
}
|