protected override int AddNewData()
        {
            m_physType = DataManager.Generate<PhysType>();
            m_physType.Name = m_textBox_name.Text;

            DataManager.PhysTypes.Add(m_physType);

            return m_physType.Id;
        }
Esempio n. 2
0
 public static int PhysicsTime(PhysType type)
 {
     switch (type)
     {
         case PhysType.Door:
             return 50;
         case PhysType.DoorOpen:
             return 5000;
         default:
             return 0;
     }
 }
Esempio n. 3
0
 public bool Queue(int x, int y, int z, byte type, PhysType phys_type, object[] meta)
 {
     try
     {
         lock(queueLock)
         {
             this.updateQueue.Enqueue(new AdvancedPhysicsTile(x, y, z, type, phys_type, meta));
         }
         return true;
     }
     catch
     {
         return false;
     }
 }
        public UserControl_PhysType(PhysType physType)
            : base("Phys Type", false)
        {
            m_physType = physType;

            if (DataIsNull())
            {
                m_textBlock_id.Text = "N/A";
                m_textBox_name.Text = string.Empty;
            }
            else
            {
                m_textBlock_id.Text = m_physType.Id.ToString();
                m_textBox_name.Text = m_physType.Name;
            }
        }
Esempio n. 5
0
 public AdvancedPhysicsTile(int x, int y, int z, byte block_type, PhysType phys_type, object[] meta)
 {
     this.x = x;
     this.y = y;
     this.z = z;
     this.block_type = block_type;
     this.phys_type = phys_type;
     this.meta = meta;
     this.startTime = DateTime.Now;
 }
 private void Select(PhysType physType)
 {
     RemoveUserControl();
     m_userControl_physType = new UserControl_PhysType(physType);
     m_grid_main.SetRowColumn(m_userControl_physType, 1, 0);
 }