Advertisement
Guest User

kill myself

a guest
Apr 9th, 2020
563
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.67 KB | None | 0 0
  1. using Rocket.API;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Xml.Serialization;
  8. using UnityEngine;
  9.  
  10. namespace OmegaCore
  11. {
  12.     public class PluginConfiguration : IRocketPluginConfiguration
  13.     {
  14.         // Ids
  15.         public int LastId = 0;
  16.  
  17.         // Markers
  18.         [XmlArrayItem(ElementName = "Marker")]
  19.         public List<Marker> Markers;
  20.  
  21.         // Database
  22.         public string DatabaseAddress = "localhost";
  23.         public string DatabaseUsername = "username";
  24.         public string DatabasePassword = "password";
  25.         public string DatabaseName = "unturned";
  26.         public int DatabasePort = 3306;
  27.  
  28.         public void LoadDefaults()
  29.         {
  30.             Markers = new List<Marker>();
  31.         }
  32.     }
  33.  
  34.     public class Marker
  35.     {
  36.         [XmlAttribute("Nome")]
  37.         public string Nome;
  38.         [XmlAttribute("Posicao")]
  39.         public Position Posicao;
  40.  
  41.         public Marker()
  42.         {
  43.             Nome = "";
  44.             Posicao = new Position();
  45.         }
  46.  
  47.         public Marker(string nome, Vector3 pos)
  48.         {
  49.             Nome = nome;
  50.             Posicao = new Position(pos);
  51.         }
  52.     }
  53.  
  54.     public class Position
  55.     {
  56.         [XmlAttribute("x")]
  57.         public double x;
  58.         [XmlAttribute("y")]
  59.         public double y;
  60.         [XmlAttribute("z")]
  61.         public double z;
  62.  
  63.         public Position()
  64.         {
  65.             x = 0;
  66.             y = 0;
  67.             z = 0;
  68.         }
  69.  
  70.         public Position(Vector3 pos)
  71.         {
  72.             x = pos.x;
  73.             y = pos.y;
  74.             z = pos.z;
  75.         }
  76.     }
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement