示例#1
0
        public CorePart(string name, int width, int height, RotateChar[] structure, CoreComponent cc, StabilityComponent sc, Direction facing = Direction.N)
            : base(name, width, height, structure, facing)
        {
            CoreComponent      = cc;
            StabilityComponent = sc;

            Components.Add(cc);
            Components.Add(sc);
        }
示例#2
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);
        }