コード例 #1
0
ファイル: Ship.cs プロジェクト: whereismyguts/Project
        //public CoordPoint Reactive { get { return -(direction * acceleration) * 50; } }

        //public CoordPoint Velosity { get { return velosity; } }

        public Ship( GameObject target, StarSystem system) : base(system) {

            Hull = new ShipHull() { Owner = this };
            Inventory = new Inventory(Hull);
            var e1 = new DefaultEngine();
                var e2 = new DefaultEngine();
                var w1 = new DefaultWeapon();
            Inventory.Add(e1);
            Inventory.Add(e2);
            Inventory.Add(w1);
            //Hull.Attach(new AttachedItem(new CoordPoint(20, 20), new CoordPoint(10,10)), Hull.Slots[0]);
            //Hull.Attach(new AttachedItem(new CoordPoint(20, 20), new CoordPoint(10, 10)), Hull.Slots[1]);

            Inventory.Attach(Hull.Slots[0], e1);
            Inventory.Attach(Hull.Slots[1], e2);
            Inventory.Attach(Hull.Slots[2], w1);

            Mass = 1;
            Color = RndService.GetColor();
            Reborn();
            if(target!=null)
               controller = new AIController(this, target, TaskType.Peersuit);

        }
コード例 #2
0
ファイル: Inventory.cs プロジェクト: whereismyguts/Project
 public Inventory(ShipHull hull) {
     
     this.hull = hull;
     RaiseChanged();
 }
コード例 #3
0
ファイル: Slot.cs プロジェクト: whereismyguts/Project
 public Slot(CoordPoint relativeLocation, ShipHull hull, SlotType type) {
     this.relativeLocation = relativeLocation;
     Hull = hull;
     Type = type;
 }