コード例 #1
0
        public void AddAttachement()
        {
            Attachement attachement = new Attachement();

            attachement.name = "default";
            AttachementViewModel vm = new AttachementViewModel(attachement);

            Attachements.Add(vm);
            _manager.attachements.Add(attachement);
        }
コード例 #2
0
        public AttachementsManager(ShipHullTable table)
        {
            attachements = new List <Attachement>();
            int i = 1;

            while (table.shipCoords["AttachPoint" + i + "Name"].Value != null)
            {
                Attachement attach = new Attachement();
                attach.position = new Vec3(table.shipCoords["AttachPoint" + i + "ObjPos"]);
                attach.rotation = new Vec3(table.shipCoords["AttachPoint" + i + "ObjRot"]);
                attach.size     = table.shipCoords["AttachPoint" + i + "Size"].IntValue;
                attach.name     = table.shipCoords["AttachPoint" + i + "Name"].Value;
                attach.isTowing = table.shipCoords["AttachPoint" + i + "isTOWING"].Value > 0.5;
                attach.swapXZ   = table.shipCoords["AttachPoint" + i + "swapXZ"].Value > 0.5;
                attach.invertX  = table.shipCoords["AttachPoint" + i + "invertX"].Value < 0; // 1 is usual, -1 is inverted
                attachements.Add(attach);
                i++;
            }
        }
コード例 #3
0
 public void LoadFrom(Attachement attachement)
 {
     _attachement = attachement;
 }
コード例 #4
0
 public AttachementViewModel(Attachement attachement)
 {
     LoadFrom(attachement);
 }