Beispiel #1
0
 public MantleTimer(int MantleNumber, Mantle context)
 {
     this.MantleNumber = MantleNumber;
     InitializeComponent();
     this.SetContext(context);
     SetWindowFlags();
     ApplySettings();
 }
Beispiel #2
0
 public MantleEventArgs(Mantle m)
 {
     Name           = m.Name;
     ID             = m.ID;
     Timer          = m.Timer;
     staticTimer    = m.staticTimer;
     Cooldown       = m.Cooldown;
     staticCooldown = m.staticCooldown;
 }
Beispiel #3
0
 public MantleEventArgs(Mantle mantle)
 {
     Name        = mantle.Name;
     Id          = mantle.ID;
     Timer       = mantle.Timer;
     MaxTimer    = mantle.staticTimer;
     Cooldown    = mantle.Cooldown;
     MaxCooldown = mantle.staticCooldown;
 }
Beispiel #4
0
 public MantleEventArgs(Mantle m)
 {
     this.Name           = m.Name;
     this.ID             = m.ID;
     this.Timer          = m.Timer;
     this.staticTimer    = m.staticTimer;
     this.Cooldown       = m.Cooldown;
     this.staticCooldown = m.staticCooldown;
 }
Beispiel #5
0
 public MantleTimer(int MantleNumber, Mantle context)
 {
     Percentage        = 1;
     this.MantleNumber = MantleNumber;
     WidgetType        = 2;
     InitializeComponent();
     SetContext(context);
     SetWindowFlags();
     ApplySettings();
 }
Beispiel #6
0
 public void SetContext(Mantle ctx)
 {
     this.Context = ctx;
     HookEvents();
 }
    public void SpawnEquipements()
    {
        for (int i = 0; i < 3; i++)
        {
            int choice = Random.Range(1, 7);

            if (choice == 1)
            {
                Equipment currentEquipment = new Staff();
                Debug.Log("-- Equipement -- : " + currentEquipment.getEquipmentInfo.nom);
                Debug.Log("Attaque physique :" + currentEquipment.getEquipmentInfo.physical_attack);
                Debug.Log("Attaque magique :" + currentEquipment.getEquipmentInfo.magic_attack);
                Debug.Log("Défense :" + currentEquipment.getEquipmentInfo.defense);
                InventorySlot AddItem(Equipment Staff);
                Inventory AddItem(Equipment Staff);
            }
            if (choice == 2)
            {
                Equipment currentEquipment = new Dagger();
                Debug.Log("-- Equipement -- : " + currentEquipment.getEquipmentInfo.nom);
                Debug.Log("Attaque physique :" + currentEquipment.getEquipmentInfo.physical_attack);
                Debug.Log("Attaque magique :" + currentEquipment.getEquipmentInfo.magic_attack);
                Debug.Log("Défense :" + currentEquipment.getEquipmentInfo.defense);
                InventorySlot AddItem(Equipment Dagger);
                Inventory AddItem(Equipment Dagger);
            }
            if (choice == 3)
            {
                Equipment currentEquipment = new Sword();
                Debug.Log("-- Equipement -- : " + currentEquipment.getEquipmentInfo.nom);
                Debug.Log("Attaque physique :" + currentEquipment.getEquipmentInfo.physical_attack);
                Debug.Log("Attaque magique :" + currentEquipment.getEquipmentInfo.magic_attack);
                Debug.Log("Défense :" + currentEquipment.getEquipmentInfo.defense);
                InventorySlot AddItem(Equipment Sword);
                Inventory AddItem(Equipment Sword);
            }
            if (choice == 4)
            {
                Equipment currentEquipment = new Chestplate();
                Debug.Log("-- Equipement -- : " + currentEquipment.getEquipmentInfo.nom);
                Debug.Log("Attaque physique :" + currentEquipment.getEquipmentInfo.physical_attack);
                Debug.Log("Attaque magique :" + currentEquipment.getEquipmentInfo.magic_attack);
                Debug.Log("Défense :" + currentEquipment.getEquipmentInfo.defense);
                InventorySlot AddItem(Equipment Chestplate);
                Inventory AddItem(Equipment Chestplate);
            }
            if (choice == 5)
            {
                Equipment currentEquipment = new Mantle();
                Debug.Log("-- Equipement -- : " + currentEquipment.getEquipmentInfo.nom);
                Debug.Log("Attaque physique :" + currentEquipment.getEquipmentInfo.physical_attack);
                Debug.Log("Attaque magique :" + currentEquipment.getEquipmentInfo.magic_attack);
                Debug.Log("Défense :" + currentEquipment.getEquipmentInfo.defense);
                InventorySlot AddItem(Equipment Mantle);
                Inventory AddItem(Equipment Mantle);
            }
            if (choice == 6)
            {
                Equipment currentEquipment = new Shield();
                Debug.Log("-- Equipement -- : " + currentEquipment.getEquipmentInfo.nom);
                Debug.Log("Attaque physique :" + currentEquipment.getEquipmentInfo.physical_attack);
                Debug.Log("Attaque magique :" + currentEquipment.getEquipmentInfo.magic_attack);
                Debug.Log("Défense :" + currentEquipment.getEquipmentInfo.defense);
                InventorySlot AddItem(Equipment Shield);
                Inventory AddItem(Equipment Shield);
            }
        }
    }
Beispiel #8
0
 public long Send(Mantle.Fix44.IMessage msg)
 {
     msg.Header.MsgSeqNum.Value = ++_lastSeqNum;
     using (var buf = new MemoryStream(1 << 10))
     {
         Mantle.Publisher.Publish(buf, Mantle.Fix44.Protocol.Value, msg);
         byte[] bytes = buf.ToArray();
         _strm.Write(bytes, 0, bytes.Length);
         _strm.Flush();
     }
     return _lastSeqNum;
 }