Exemplo n.º 1
0
 public Communication(EType type, ETarget target, dynamic content, bool success)
 {
     Type    = type;
     Target  = target;
     Content = content;
     Success = success;
 }
Exemplo n.º 2
0
        // Actions depuis le serveur
        public virtual Boolean downloadFile(ETarget target, BackgroundWorker worker)
        {
            switch (target)
            {
            case ETarget.FRANPETTE:
                ftpDownload("Franpette/FranpetteStatus.xml", Utils.getRoot("FranpetteStatus.xml"), worker);
                printInfo(_resMan.GetString("franpette_ready", _cul));
                break;

            case ETarget.MINECRAFT:
                printInfo(_resMan.GetString("franpette_checkCsv", _cul));
                File.WriteAllLines(Utils.getRoot("Minecraft.csv"), Utils.checkCsv(true, Utils.getProperty("directory", Utils.getRoot()) + "Minecraft"));
                ftpDownload("Franpette/Minecraft.csv", Utils.getRoot("Minecraft_server.csv"), worker);
                filesToDownload(Utils.getRoot("Minecraft_server.csv"), Utils.getRoot("Minecraft.csv"), worker);
                printInfo(_resMan.GetString("franpette_checkCsv", _cul));
                File.WriteAllLines(Utils.getRoot("Minecraft.csv"), Utils.checkCsv(true, Utils.getProperty("directory", Utils.getRoot()) + "Minecraft"));
                ftpUpload(Utils.getRoot("Minecraft.csv"), "Franpette/Minecraft.csv", worker);
                break;

            default:
                Utils.debug("[NetworkFTP] downloadFile : Target is missing.");
                break;
            }
            return(true);
        }
Exemplo n.º 3
0
 public void ProcessPick(MouseEventArgs e, ETarget tg, OnAction proc)
 {
     if (!m_DDeviceXInited)
     {
         return;
     }
     m_DDeviceX.ProcessMouseClick(e, tg, proc);
 }
Exemplo n.º 4
0
 public void ProcessMouse(MouseEventArgs e, ETarget tg, IKeysProvider keys, OnAction act)
 {
     if (!m_DDeviceXInited)
     {
         return;
     }
     m_DDeviceX.ProcessMouseMove(e, tg, keys, act);
 }
Exemplo n.º 5
0
 /// <summary>
 /// Konstruktor klasy piechota
 /// </summary>
 /// <param name="name"></param>
 /// <param name="health"></param>
 /// <param name="firePowerLight"></param>
 /// <param name="armorPenetration"></param>
 /// <param name="firePowerHeavy"></param>
 /// <param name="firePowerAir"></param>
 /// <param name="target"></param>
 /// <param name="totalCost"></param>
 public Infantry(string name, int health, int firePowerLight, int armorPenetration, int firePowerHeavy,
                 int firePowerAir, ETarget target, int totalCost)
 {
     Name             = name;
     Health           = health;
     FirePowerLight   = firePowerLight;
     ArmorPenetration = armorPenetration;
     FirePowerHeavy   = firePowerHeavy;
     FirePowerAir     = firePowerAir;
     Target           = target;
     TotalCost        = totalCost;
     BaseHealth       = health;
 }
Exemplo n.º 6
0
 /// <summary>
 /// Konstruktor samolotu
 /// </summary>
 /// <param name="name"></param>
 /// <param name="health"></param>
 /// <param name="firePowerLight"></param>
 /// <param name="armorPenetration"></param>
 /// <param name="firePowerHeavy"></param>
 /// <param name="firePowerAir"></param>
 /// <param name="maneuverability"></param>
 /// <param name="target"></param>
 /// <param name="totalCost"></param>
 public Plane(string name, int health, int firePowerLight, int armorPenetration, int firePowerHeavy,
              int firePowerAir, int maneuverability, ETarget target, int totalCost)
 {
     Name             = name;
     Health           = health;
     FirePowerLight   = firePowerLight;
     ArmorPenetration = armorPenetration;
     FirePowerHeavy   = firePowerHeavy;
     FirePowerAir     = firePowerAir;
     Maneuverability  = maneuverability;
     Target           = target;
     TotalCost        = totalCost;
     BaseHealth       = health;
 }
Exemplo n.º 7
0
 public Gauge(
     Id id_,
     NamedHash hash_,
     ETarget target_,
     Data.Skill.Unit.Stat.ECategory category_,
     Data.Skill.Unit.Gauge.EInputType inputType_,
     MetricReference reference_)
     : base(id_)
 {
     Hash      = hash_;
     Target    = target_;
     Category  = category_;
     InputType = inputType_;
     Reference = reference_;
 }
Exemplo n.º 8
0
 internal void PerformEQ()
 {
     if (ETarget != null && ETarget.IsValid && !ETarget.ECanKill() && Yasuo.LSIsDashing() && Spells[Q].IsReady())
     {
         if (!TornadoReady)
         {
             Spells[Q].Cast(ETarget);
         }
         else
         {
             if (ETarget is AIHeroClient)
             {
                 Spells[Q].Cast(ETarget);
             }
         }
     }
 }
Exemplo n.º 9
0
 /// <summary>
 /// Funkcja formatująca tabelę jednostek
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void dataGridViewUnitList_CellFormatting(object sender, DataGridViewCellFormattingEventArgs e)
 {
     if (dataGridViewUnitList.Columns[e.ColumnIndex].Name == "Target")
     {
         ETarget enumValue = (ETarget)e.Value;
         if (enumValue == ETarget.Infantry)
         {
             e.Value = "Piechota";
         }
         else if (enumValue == ETarget.Tank)
         {
             e.Value = "Czołg";
         }
         else if (enumValue == ETarget.Plane)
         {
             e.Value = "Samolot";
         }
     }
 }
Exemplo n.º 10
0
        public void ProcessMouseClick(MouseEventArgs e, ETarget tg, OnAction proc)
        {
            int x = e.X, y = e.Y;

            System.Drawing.Point pt = new System.Drawing.Point(x, y);
            IKeysProvider        kk = new KeyboardState(e);
            EAction act;
            bool    ert             = (e.Button == MouseButtons.Right);

            if (kk.qCtrl)
            {
                if (kk.qAlt)
                {
                    act = EAction.ActionCtrlAltClick;
                }
                else if (kk.qShift)
                {
                    act = ert ? EAction.ActionCtrlShiftRClick : EAction.ActionCtrlShiftClick;
                }
                else
                {
                    act = ert ? EAction.ActionCtrlRClick : EAction.ActionCtrlClick;
                }
            }
            else if (kk.qShift)
            {
                act = ert ? EAction.ActionShiftRClick : EAction.ActionShiftClick;
            }
            else if (kk.qAlt)
            {
                act = ert ? EAction.ActionAltRClick : EAction.ActionAltClick;
            }
            else
            {
                act = ert ? EAction.ActionRClick : EAction.ActionClick;
            }
            Camera.ProcessMouseMove(this, act, tg, pt, 0, 0, proc);
        }
Exemplo n.º 11
0
    private void TabMonsterSpell()
    {
        TestMonster activeMonsterData = m_Main.ActiveMonsterData;

        if (activeMonsterData == null || activeMonsterData.AvailableSpells == null || activeMonsterData.AvailableSpells.Length == 0)
        {
            return;
        }
        GUILayout.Label("Target", new GUILayoutOption[0]);
        m_TargetIndex      = (ETarget)GUILayout.SelectionGrid((Int32)m_TargetIndex, m_PartySelection, m_PartySelection.Length, (GUILayoutOption[])null);
        m_MonsterSpellView = GUILayout.BeginScrollView(m_MonsterSpellView, new GUILayoutOption[]
        {
            GUILayout.MaxHeight(200f)
        });
        foreach (TestSpell testSpell in activeMonsterData.AvailableSpells)
        {
            if (GUILayout.Button(testSpell.Name, new GUILayoutOption[0]))
            {
                m_Main.MonsterCastSpell(m_TargetIndex, testSpell);
            }
        }
        GUILayout.EndScrollView();
    }
Exemplo n.º 12
0
    private void TabPartySpell()
    {
        List <TestSpell> partySpells = m_Database.PartySpells;

        if (partySpells.Count == 0)
        {
            return;
        }
        GUILayout.Label("Wizard", new GUILayoutOption[0]);
        m_WizardIndex          = (ETarget)GUILayout.SelectionGrid((Int32)m_WizardIndex, m_PartySelection, m_PartySelection.Length, (GUILayoutOption[])null);
        m_PartySpellScrollView = GUILayout.BeginScrollView(m_PartySpellScrollView, new GUILayoutOption[]
        {
            GUILayout.MaxHeight(700f)
        });
        foreach (TestSpell testSpell in partySpells)
        {
            if (GUILayout.Button(testSpell.Name, m_leftAlignedBtnStyle, new GUILayoutOption[0]))
            {
                m_Main.PartyCastSpell(m_WizardIndex, testSpell);
            }
        }
        GUILayout.EndScrollView();
    }
Exemplo n.º 13
0
Arquivo: Main.cs Projeto: burstas/rmps
 private ITarget GetTarget(ETarget target)
 {
     switch (target)
     {
         case ETarget.Man:
             return new ManTarget();
         case ETarget.App:
             return new AppTarget(_UserModel);
         case ETarget.Scb:
             return new ScbTarget();
         case ETarget.Net:
             return new NetTarget();
         case ETarget.Kms:
             return new KmsTarget();
         case ETarget.Img:
             return new ImgTarget();
         default:
             return null;
     }
 }
Exemplo n.º 14
0
 public abstract void ProcessMouseMove(S3DirectX scene, EAction action, ETarget tg, System.Drawing.Point pt, int DX, int DY, OnAction proc);
Exemplo n.º 15
0
    public void MonsterCastSpell(ETarget target, TestSpell spell)
    {
        m_LastSpellIsMonster = false;
        m_LastSpell          = spell;
        m_TargetOrWizard     = target;
        FXDescription fxdescription = Helper.ResourcesLoad <FXDescription>(spell.EffectPath, false);

        if (fxdescription == null)
        {
            Debug.LogError("FXDescription not found! at " + spell.EffectPath, this);
            return;
        }
        if (target == ETarget.Party)
        {
            target = (ETarget)UnityEngine.Random.Range(1, 4);
        }
        GameObject gameObject;

        switch (target)
        {
        case ETarget.Member1:
            gameObject = m_Member1;
            break;

        case ETarget.Member2:
            gameObject = m_Member2;
            break;

        case ETarget.Member3:
            gameObject = m_Member3;
            break;

        case ETarget.Member4:
            gameObject = m_Member4;
            break;

        default:
            return;
        }
        Vector3 forward    = m_ActiveMonster.transform.forward;
        Vector3 p_slotLeft = -m_ActiveMonster.transform.right;

        m_ActiveMonsterAnimationHandler.AttackMagic(spell.AnimationNum);
        AnimatorEventHandler component     = m_ActiveMonsterAnimationHandler.GetComponent <AnimatorEventHandler>();
        GameObject           activeMonster = m_ActiveMonster;
        ETargetType          targetType    = spell.TargetType;
        FXArgs p_args;

        if ((targetType & ETargetType.MULTY) == ETargetType.MULTY)
        {
            p_args = new FXArgs(activeMonster, m_PartySlot, activeMonster, m_PartySlot, activeMonster.transform.position, forward, p_slotLeft, m_PartySlot.transform.position, new List <GameObject>
            {
                m_Member1,
                m_Member2,
                m_Member3,
                m_Member4
            });
        }
        else if ((targetType & ETargetType.SINGLE) == ETargetType.SINGLE)
        {
            p_args = new FXArgs(activeMonster, gameObject, activeMonster, gameObject, activeMonster.transform.position, forward, p_slotLeft, m_PartySlot.transform.position, new List <GameObject>
            {
                gameObject
            });
        }
        else if ((targetType & ETargetType.ADJACENT) == ETargetType.ADJACENT)
        {
            p_args = new FXArgs(activeMonster, activeMonster, activeMonster, activeMonster, activeMonster.transform.position, forward, p_slotLeft, m_PartySlot.transform.position, new List <GameObject>
            {
                gameObject
            });
        }
        else
        {
            p_args = new FXArgs(activeMonster, activeMonster, activeMonster, activeMonster, activeMonster.transform.position, forward, p_slotLeft, m_PartySlot.transform.position, new List <GameObject>
            {
                gameObject
            });
        }
        fxdescription = Helper.Instantiate <FXDescription>(fxdescription);
        fxdescription.Configurate(component, p_args);
    }
Exemplo n.º 16
0
    public void PartyCastSpell(ETarget wizard, TestSpell spell)
    {
        m_LastSpellIsMonster = false;
        m_LastSpell          = spell;
        m_TargetOrWizard     = wizard;
        if (!String.IsNullOrEmpty(spell.EffectPath))
        {
            FXQueue fxqueue = Helper.ResourcesLoad <FXQueue>(spell.EffectPath, false);
            if (fxqueue != null && m_ActiveMonster != null)
            {
                if (wizard == ETarget.Party)
                {
                    wizard = (ETarget)UnityEngine.Random.Range(1, 4);
                }
                GameObject gameObject;
                switch (wizard)
                {
                case ETarget.Member1:
                    gameObject = m_Member1;
                    break;

                case ETarget.Member2:
                    gameObject = m_Member2;
                    break;

                case ETarget.Member3:
                    gameObject = m_Member3;
                    break;

                case ETarget.Member4:
                    gameObject = m_Member4;
                    break;

                default:
                    return;
                }
                Vector3     forward    = m_Party.transform.forward;
                Vector3     p_slotLeft = -m_Party.transform.right;
                ETargetType targetType = spell.TargetType;
                FXArgs      args;
                if ((targetType & ETargetType.PARTY) == ETargetType.PARTY)
                {
                    args = new FXArgs(m_PartySlot, m_PartySlot, m_PartySlot, m_PartySlot, m_PartySlot.transform.position, forward, p_slotLeft, m_PartySlot.transform.position, new List <GameObject>
                    {
                        m_PartySlot
                    });
                }
                else if ((targetType & ETargetType.LINE_OF_SIGHT) == ETargetType.LINE_OF_SIGHT)
                {
                    args = new FXArgs(m_PartySlot, m_MonsterSlot, m_PartySlot, m_MonsterSlot, m_PartySlot.transform.position, forward, p_slotLeft, m_MonsterSlot.transform.position, new List <GameObject>
                    {
                        m_ActiveMonster
                    });
                }
                else if ((targetType & ETargetType.MULTY) == ETargetType.MULTY)
                {
                    args = new FXArgs(gameObject, m_MonsterSlot, gameObject, m_MonsterSlot, m_PartySlot.transform.position, forward, p_slotLeft, m_MonsterSlot.transform.position, new List <GameObject>
                    {
                        m_ActiveMonster
                    });
                }
                else if ((targetType & ETargetType.SINGLE) == ETargetType.SINGLE)
                {
                    FXTags     component  = m_ActiveMonster.GetComponent <FXTags>();
                    GameObject p_endPoint = m_ActiveMonster;
                    if (component != null)
                    {
                        p_endPoint = component.FindOne("HitSpot");
                    }
                    else
                    {
                        Debug.LogError("FXTags not found!!\nTarget=" + m_ActiveMonster, m_ActiveMonster);
                    }
                    args = new FXArgs(gameObject, m_MonsterSlot, gameObject, p_endPoint, m_PartySlot.transform.position, forward, p_slotLeft, m_MonsterSlot.transform.position, new List <GameObject>
                    {
                        m_ActiveMonster
                    });
                }
                else if ((targetType & ETargetType.ADJACENT) == ETargetType.ADJACENT)
                {
                    args = new FXArgs(gameObject, m_PartySlot, gameObject, m_PartySlot, m_PartySlot.transform.position, forward, p_slotLeft, m_MonsterSlot.transform.position, new List <GameObject>
                    {
                        m_ActiveMonster
                    });
                }
                else
                {
                    Debug.LogError("error !! spellType: " + targetType);
                    args = new FXArgs(gameObject, m_ActiveMonster, gameObject, m_ActiveMonster, m_PartySlot.transform.position, forward, p_slotLeft, m_MonsterSlot.transform.position, new List <GameObject>
                    {
                        m_ActiveMonster
                    });
                }
                FXQueue fxqueue2 = Helper.Instantiate <FXQueue>(fxqueue);
                fxqueue2.Finished += delegate(Object sender, EventArgs e)
                {
                    m_ActiveMonsterAnimationHandler.Hit();
                };
                fxqueue2.Execute(args);
            }
            else
            {
                Debug.LogError("SpellEffect not found! " + spell.EffectPath);
            }
        }
        PartyCastBuff(spell);
        MonsterCastBuff(spell);
    }
Exemplo n.º 17
0
 public COEDescription(ETarget target)
 {
     Target = target;
     Radix = 16;
 }
Exemplo n.º 18
0
 public COEDescription(ETarget target)
 {
     Target = target;
     Radix  = 16;
 }
Exemplo n.º 19
0
 // General ctor chain
 public CtorChainStatement(ETarget eTarget, Exp [] arParams)
 {        
     
     m_eTarget = eTarget;            
     m_arParams = (arParams == null) ? (new Exp[0]) : arParams;
 }
Exemplo n.º 20
0
        public override void ProcessMouseMove(S3DirectX scene, EAction action, ETarget tg, Point pt, int DX, int DY, OnAction proc)
        {
            /*
             *          if(keys.qRightMouse){
             *              if(keys.qShift) _thisAction=EAction.ActionXYSlide; // WSlide, XY-rotate
             *              else _thisAction=EAction.ActionSlide; // WSlide, XY-rotate
             *              }else{
             *          if(keys.qCtrl) _thisAction=EAction.ActionMoveTo;     // Zoom
             *          else if(keys.qShift) _thisAction=EAction.ActionPan;  // WPan
             *          else _thisAction=EAction.ActionRotate;               // 3D rotate
             *          }
             */



            Vector3 vec  = new Vector3();
            Vector3 shft = new Vector3();
            int     wid  = scene.width;
            int     hgt  = scene.height;
            double  acf  = 3.0 / hgt; // pi/3 for half of screen

            double ddis = Math.Pow(0.5, DY * 3.0 / hgt);
            double wdis = Math.Pow(0.5, DX * 3.0 / wid);

            switch (action)
            {
            case EAction.ActionSlide:      // R
            case EAction.ActionXYSlide:    // Shift-R
                Trans.Rotate(2, 1, DX * 2 * Math.PI / wid);
                Trans.Rotate(0, 3, (double)DY * acf * Angle);
                break;

            case EAction.ActionMoveTo:      // Ctrl-L
                R = Math.Min(2 * R0, Math.Max(0.1 * R0, (R + R0) / ddis)) - R0;
                break;

            case EAction.ActionZoom:      // Ctrl-R
                Angle = (float)Math.Min(Math.PI, Angle / ddis);
                break;

            case EAction.ActionPan:     // Shift-L
                Trans.Rotate(0, 1, (double)DX * acf * Angle);
                Trans.Rotate(0, 2, (double)DY * acf * Angle);
                break;

            case EAction.ActionRotate: {      // L
                if (m_addMask != null)
                {
                    if (m_addMask[0])
                    {
                        goto case EAction.ActionPan;
                    }
                    if (m_addMask[1])
                    {
                        goto case EAction.ActionMoveTo;
                    }
                }
                double dx = (double)(DX * acf);
                double dy = (double)(DY * acf);
                Trans.Rotate(3, 1, dx * Angle);
                Trans.Rotate(3, 2, dy * Angle);
                break;
            }

            case EAction.ActionClick:
            case EAction.ActionShiftClick:
            case EAction.ActionAltClick:
            case EAction.ActionCtrlClick:
            case EAction.ActionCtrlShiftClick:
            case EAction.ActionCtrlAltClick:
            case EAction.ActionRClick:
            case EAction.ActionShiftRClick:
            case EAction.ActionAltRClick:
            case EAction.ActionCtrlShiftRClick:
            case EAction.ActionCtrlRClick: {
                double vx, vy;
                scene.DirAndOrig(pt.X, pt.Y, out vx, out vy);
                vec.Normalize();
                if (proc != null)
                {
                    proc(action, vx, vy, 0);
                }
                break;
            }
            }
            m_changed          = true;
            scene.SceneChanged = true;
        }
Exemplo n.º 21
0
        public void ProcessMouseMove(MouseEventArgs e, ETarget tg, IKeysProvider keys, OnAction proc)
        {
            int   CX         = e.X;
            int   CY         = e.Y;
            Point _thisPoint = new Point(CX, CY);

            if (!keys.qLeftMouse && !keys.qRightMouse)
            {
                m_lastAction = EAction.Undef; return;
            }

            EAction _thisAction = EAction.ActionRotate;

            if (tg == ETarget.TargetGrip)
            {
                _thisAction = EAction.ActionPan;
            }
            else
            {
                // none => rotate
                // ctrl => moveto/FLength
                // shift => pan
                // Right => Z-slide/z-rotate

                if (keys.qRightMouse)
                {
                    if (keys.qShift)
                    {
                        _thisAction = EAction.ActionXYSlide;
                    }
                    else if (keys.qCtrl)
                    {
                        _thisAction = EAction.ActionZoom;
                    }
                    else
                    {
                        _thisAction = EAction.ActionSlide;
                    }
                }
                else if (keys.qCtrl)
                {
                    _thisAction = EAction.ActionMoveTo;
                }
                else if (keys.qShift)
                {
                    _thisAction = EAction.ActionPan;
                }
                else
                {
                    _thisAction = EAction.ActionRotate;
                }
            }

            if (m_lastAction != EAction.Undef)
            {
                lock (this) {
                    int _DX = CX - m_lastPoint.X;
                    int _DY = CY - m_lastPoint.Y;

                    Camera.ProcessMouseMove(this, _thisAction, tg, _thisPoint, _DX, _DY, proc);
                }
            }
            m_lastPoint  = _thisPoint;
            m_lastAction = _thisAction;
            SceneChanged = true;
        }
Exemplo n.º 22
0
 public void ProcessMouseMove(MouseEventArgs e, ETarget tg, OnAction proc)
 {
     ProcessMouseMove(e, tg, new KeyboardState(e), proc);
 }