Пример #1
0
 public PartHandler(CorePart core, IEnumerable <Part> parts) : this(core)
 {
     foreach (Part p in parts)
     {
         Add(p);
     }
 }
Пример #2
0
        public PartHandler(CorePart core)
        {
            Facing      = Direction.N;
            PartList    = new List <Part>();
            WeaponGroup = new WeaponGroup();

            Bounds            = new Rectangle(0, 0, 0, 0);
            TotalHeatCapacity = 0;

            Core = core;
            Add(core);
        }
Пример #3
0
        //internal static Weapon BuildSword()
        //{
        //    static ICommand attack(Mech m, IEnumerable<Loc> targets)
        //    {
        //        var anim = Option.Some<IAnimation>(new ExplosionAnimation(targets, Colors.Fire));
        //        return new DelayAttackCommand(120, new AttackCommand(m, EngineConsts.TURN_TICKS, 20, targets, anim, true));
        //    }

        //    var tiles = new RotateChar[12] { em, dbv, em, em, dbv, em, dbh, dbc, dbh, em, vt, em };

        //    return new Weapon(3, 4, new Loc(0, 0), Direction.N, tiles, 100,
        //                        new TargetZone(TargetShape.Self, 4), attack)
        //    { Name = "Sword", HeatGenerated = 0, Cooldown = 2, SpeedDelta = -10 };
        //}

        internal static CorePart BuildSmallCore()
        {
            var tiles = new RotateChar[9] {
                sr, arn, sl, b3, at, b3, sl, b2, sr
            };

            var cc = new CoreComponent(1, 1);
            var sc = new StabilityComponent(100);
            var cp = new CorePart("Core (small)", 3, 3, tiles, cc, sc);

            cp.Add(new HeatComponent(0, 30, 0.5, 3));
            return(cp);
        }