Exemple #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);
            }
        }
Exemple #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();
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #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);
        }
Exemple #6
0
 public MoreChainTests()
 {
     InitScript.Init();
 }
Exemple #7
0
 public ControllableTests()
 {
     InitScript.Init();
 }
Exemple #8
0
 public WorldTests()
 {
     InitScript.Init();
 }
Exemple #9
0
 public Prediction_Tests()
 {
     InitScript.Init();
 }