public ReactorInstanceEditor(ReactorInstance item)
 {
     InitializeComponent();
     this.item      = item;
     xInput.Value   = item.X;
     yInput.Value   = item.Y;
     pathLabel.Text = HaCreatorStateManager.CreateItemDescription(item);
     if (item.Name == null)
     {
         useName.Checked = false;
     }
     else
     {
         nameBox.Text = item.Name;
     }
     timeBox.Value = item.ReactorTime;
 }
示例#2
0
 public ReactorInstanceEditor(ReactorInstance item)
 {
     InitializeComponent();
     this.item = item;
     styleManager.ManagerStyle = UserSettings.applicationStyle;
     xInput.Value   = item.X;
     yInput.Value   = item.Y;
     pathLabel.Text = Editor.CreateItemDescription(item, "\r\n");
     if (item.Name == null)
     {
         useName.Checked = false;
     }
     else
     {
         nameBox.Text = item.Name;
     }
     timeBox.Value = item.ReactorTime;
 }
示例#3
0
        /// <summary>
        /// Create reactor item
        /// </summary>
        /// <param name="texturePool"></param>
        /// <param name="reactorInstance"></param>
        /// <param name="device"></param>
        /// <param name="usedProps"></param>
        /// <returns></returns>
        public static ReactorItem CreateReactorFromProperty(TexturePool texturePool, ReactorInstance reactorInstance, GraphicsDevice device, ref List <WzObject> usedProps)
        {
            ReactorInfo reactorInfo        = (ReactorInfo)reactorInstance.BaseInfo;
            WzImage     linkedReactorImage = reactorInfo.LinkedWzImage;

            List <IDXObject> frames = new List <IDXObject>();

            WzImageProperty framesImage = (WzImageProperty)linkedReactorImage["0"]?["0"];

            if (framesImage != null)
            {
                frames = LoadFrames(texturePool, framesImage, reactorInstance.X, reactorInstance.Y, device, ref usedProps);
            }
            if (frames.Count == 0)
            {
                return(null);
            }
            return(new ReactorItem(reactorInstance, frames));
        }
 public ReactorItem(ReactorInstance reactorInstance, IDXObject frame0)
     : base(frame0, reactorInstance.Flip)
 {
     this.reactorInstance = reactorInstance;
 }
 public ReactorItem(ReactorInstance reactorInstance, List <IDXObject> frames)
     : base(frames, reactorInstance.Flip)
 {
     this.reactorInstance = reactorInstance;
 }