Exemplo n.º 1
0
        public InventoryTests()
        {
            InitScript.Init();

            {
                entityFactory = new EntityFactory();

                // AddComponents
                var transform    = Transform.AddTo(entityFactory, Layers.REAL, TransformFlags.Default);
                var stats        = Stats.AddTo(entityFactory, Registry.Global.Stats._map);
                var acting       = Acting.AddTo(entityFactory, null, Algos.SimpleAlgo, Order.Player);
                var moving       = Moving.AddTo(entityFactory);
                var displaceable = Displaceable.AddTo(entityFactory, Layers.BLOCK);
                var inventory    = Inventory.AddTo(entityFactory);
                var ticking      = Ticking.AddTo(entityFactory);

                // InitComponents
                acting.DefaultPreset(entityFactory);
                moving.DefaultPreset();
                displaceable.DefaultPreset();
                ticking.DefaultPreset();

                // Retouch
                Equip.OnDisplaceHandlerWrapper.HookTo(entityFactory);

                Inventory.AddInitTo(entityFactory);
            }

            {
                itemFactory = new EntityFactory();
                var transform = Transform.AddTo(itemFactory, Layers.ITEM, 0);
            }
        }
Exemplo n.º 2
0
        public MovingTests()
        {
            InitScript.Init();

            entityFactory = new EntityFactory();
            Transform.AddTo(entityFactory, Layers.REAL, 0);
            Stats.AddTo(entityFactory, Registry.Global.Stats._map);
            Displaceable.AddTo(entityFactory, Layers.BLOCK).DefaultPreset();
            Moving.AddTo(entityFactory).DefaultPreset();
        }
Exemplo n.º 3
0
        public TargetingTests()
        {
            InitScript.Init();

            wallFactory = new EntityFactory();
            Transform.AddTo(wallFactory, Layers.WALL, 0);
            Attackable.AddTo(wallFactory, Attackness.IS_BLOCK);

            entityFactory = new EntityFactory();
            Transform.AddTo(entityFactory, Layers.REAL, 0);
            Attackable.AddTo(entityFactory, Attackness.ALWAYS);
        }
Exemplo n.º 4
0
        public GridTests()
        {
            InitScript.Init();

            wallFactory = new EntityFactory();
            Transform.AddTo(wallFactory, Layers.WALL, 0);

            entityFactory = new EntityFactory();
            Transform.AddTo(entityFactory, Layers.REAL, TransformFlags.Default);

            directionalBlockFactory = new EntityFactory();
            Transform.AddTo(directionalBlockFactory, Layers.WALL, TransformFlags.Directed);
        }
Exemplo n.º 5
0
        public AttackingTests()
        {
            InitScript.Init();

            // attacking requires stats and transform
            attackerFactory = new EntityFactory();
            Transform.AddTo(attackerFactory, Layers.REAL, 0);
            Stats.AddTo(attackerFactory, Registry.Global.Stats._map);
            Attacking.AddTo(attackerFactory, entity => BufferedAttackTargetProvider.Simple, Layers.REAL, Faction.Any).SkipEmptyAttackPreset();


            attackedFactory = new EntityFactory();
            Transform.AddTo(attackedFactory, Layers.REAL, 0);
            FactionComponent.AddTo(attackedFactory, Faction.Environment);
            Stats.AddTo(attackedFactory, Registry.Global.Stats._map);
            Attackable.AddTo(attackedFactory, Attackness.ALWAYS);
        }
Exemplo n.º 6
0
 public MoreChainTests()
 {
     InitScript.Init();
 }
Exemplo n.º 7
0
 public ControllableTests()
 {
     InitScript.Init();
 }
Exemplo n.º 8
0
 public WorldTests()
 {
     InitScript.Init();
 }
Exemplo n.º 9
0
 public Prediction_Tests()
 {
     InitScript.Init();
 }