public override void HandleEvent(GEvent e)
    {
        string attackerGuid = (string)e.Arguments.GetValue(0);
        string targetGuid   = (string)e.Arguments.GetValue(1);
        string weapon       = (string)e.Arguments.GetValue(2);

        GameObject       obj = GuidList.GetGameObject(attackerGuid);
        AttackController ac  = (AttackController)obj.GetComponent("AttackController");
        Weapon           wep = ac.GetWeapon(weapon);

        wep.RemoveTarget(targetGuid);
    }
    public void FillWeaponFields(string weapon_key)
    {
        AttackController uat = currentObject.GetComponent <AttackController>();

        Weapon w = uat.GetWeapon(weapon_key);

        InputField namefield = WepNameVal.GetComponent <InputField> ();

        wname          = w.GetName();
        namefield.text = wname;

        InputField rangefield = WepRangeVal.GetComponent <InputField> ();

        wrange          = w.GetRange();
        rangefield.text = wrange.ToString();

        InputField lethfield = WepLethalityVal.GetComponent <InputField> ();

        wlethal        = w.GetDamage();
        lethfield.text = wlethal.ToString();

        InputField probfield = WepProbVal.GetComponent <InputField> ();

        wprob          = w.GetHitChance();
        probfield.text = wprob.ToString();

        InputField ammofield = WepAmmoVal.GetComponent <InputField> ();

        wammo          = w.GetMaxAmmo();
        ammofield.text = wammo.ToString();

        InputField currammofield = WepCurrAmmoVal.GetComponent <InputField> ();

        wcurrammo          = w.GetCurAmmo();
        currammofield.text = wcurrammo.ToString();

        InputField ratefield = WepRateVal.GetComponent <InputField> ();

        wrate          = w.GetMaxShots();
        ratefield.text = wrate.ToString();
    }
    public void AlterWeaponData(string key)
    {
        AttackController uat = currentObject.GetComponent(
            ObjectFactoryHelper.DetermineControllerLiveObject(
                "Attack", currentObject)) as AttackController;
        Single validator = 0.0f;
        Weapon wep       = uat.GetWeapon(key);

        string wnameval = WepNameVal.GetComponent <InputField> ().text;

        string wlethstring = WepLethalityVal.GetComponent <InputField> ().text;
        bool   lethvalid   = Single.TryParse(wlethstring, out validator);
        float  wlethval    = 0f;

        if (lethvalid)
        {
            wlethval = Single.Parse(wlethstring);
        }
        else
        {
            wlethval = wep.GetDamage();
        }

        string wrangestring = WepRangeVal.GetComponent <InputField> ().text;
        bool   rangevalid   = Single.TryParse(wrangestring, out validator);
        float  wrangeval    = 0f;

        if (rangevalid)
        {
            wrangeval = Single.Parse(wrangestring);
        }
        else
        {
            wrangeval = wep.GetRange();
        }

        string wprobstring = WepProbVal.GetComponent <InputField> ().text;
        bool   probvalid   = Single.TryParse(wprobstring, out validator);
        float  wprobval    = 0f;

        if (probvalid)
        {
            wprobval = Single.Parse(wprobstring);
        }
        else
        {
            wprobval = wep.GetHitChance();
        }

        string wammostring = WepAmmoVal.GetComponent <InputField> ().text;
        bool   ammovalid   = Single.TryParse(wammostring, out validator);
        float  wammoval    = 0f;

        if (ammovalid)
        {
            wammoval = Single.Parse(wammostring);
        }
        else
        {
            wammoval = wep.GetMaxAmmo();
        }

        string wcurrammostring = WepCurrAmmoVal.GetComponent <InputField> ().text;
        bool   currammovalid   = Single.TryParse(wcurrammostring, out validator);
        float  wcurrammoval    = 0f;

        if (currammovalid)
        {
            wcurrammoval = Single.Parse(wcurrammostring);
        }
        else
        {
            wcurrammoval = wep.GetCurAmmo();
        }

        string wratestring = WepRateVal.GetComponent <InputField> ().text;
        bool   ratevalid   = Single.TryParse(wratestring, out validator);
        float  wrateval    = 0f;

        if (ratevalid)
        {
            wrateval = Single.Parse(wratestring);
        }
        else
        {
            wrateval = wep.GetMaxShots();
        }

        uat.ThrowDamageChangeEvent(key, wlethval);
        uat.ThrowRangeChangeEvent(key, wrangeval);
        uat.ThrowHitChanceChangeEvent(key, wprobval);
        uat.ThrowMaxAmmoChangeEvent(key, (int)wammoval);
        uat.ThrowCurrentAmmoChangeEvent(key, (int)wcurrammoval);
        uat.ThrowMaxShotsChangeEvent(key, (int)wrateval);
    }