예제 #1
0
 private void CreateEntities(ecsBootRoutine routine)
 {
     if (routine == ecsBootRoutine.Testing)
     {
         AddEntity(CreateEntity(EntityType.Hero, position: new Vector2Ref(new Vector2(100, 0))));
         AddEntity(CreateEntity(EntityType.Wall, position: new Vector2Ref(new Vector2(200, 0))));
     }
 }
예제 #2
0
        private void CreateSystems(ecsBootRoutine routine)
        {
            _drawSystem = new DrawSystem(_camera);

            _systemSet.Add(new StateSystem(this));

            _systemSet.Add(new InputSystem(this, _camera));
            _systemSet.Add(new BlinkingSystem());
            _systemSet.Add(new MovementSystem());
            _systemSet.Add(new CollisionSystem());
            _systemSet.Add(new TimerSystem());
            _systemSet.Add(new HealthSystem());
            _systemSet.Add(new IntelligenceSystem());

            _systemSet.Add(new AnimationSystem());
            _systemSet.Add(_drawSystem);
        }
예제 #3
0
 public void StartupRoutine(ecsBootRoutine routine)
 {
     CreateEntities(routine);
     CreateSystems(routine);
     RegisterAllEntities();
 }