public void changeWeapon()
    {
        actionCancel();
        activeSkill = Enums.Actions.ChangeWeapon;
        // Audiofeedback wenn Waffe gewechselt wird
        AudioManager.playMainClick();

        AttributeComponent attr = managerSys.getSelectedFigurine().GetComponent<AttributeComponent>();
        InventoryComponent inv = managerSys.getSelectedFigurine().GetComponent<InventoryComponent>();
        dijkstra.executeDijsktra(attr.getCurrentCell(), attr.actMovRange, attr.weapon.GetComponent<WeaponComponent>().weaponRange);
        inv.isPrimary = !inv.isPrimary;

        attr.model.GetComponent<WeaponHolding>().swapWeapons();
    }
 public ViewPageSource(string source, Enums.Actions action, Tuple<string, string, string> domainUrlAndTitle)
 {
     InitializeComponent();
     this.domainUrlAndTitle = domainUrlAndTitle;
     this.action = action;
     fctb = new FastColoredTextBox();
     fctb.ReadOnly = true;
     fctb.Dock = DockStyle.Fill;
     fctb.Language = Language.HTML;
     fctb.WordWrap = true;
     fctb.Text = source;
     Size = new System.Drawing.Size(800, 600);
     Icon = Properties.Resources.source_code1;
     Text = $"Viewing {action.ToString()} for {domainUrlAndTitle.Item1}";
     uiSourcePanel.Controls.Add(fctb);
     //toolStrip1.ImageScalingSize = new Size(40, 40);
 }
 public void teargas()
 {
     actionCancel();
     activeSkill = Enums.Actions.Teargas;
     input.gasAusgewaehlt = true;
 }
 public void smoke()
 {
     actionCancel();
     activeSkill = Enums.Actions.Smoke;
     input.smokeAusgewaehlt = true;
     AttributeComponent temp = managerSys.selectedFigurine.GetComponent<AttributeComponent>();
     dijkstra.executeDijsktra(temp.getCurrentCell(), 0, temp.attackRange);
 }
    public void shoot()
    {
        actionCancel();
        activeSkill = Enums.Actions.Shoot;

        input.angriffAusgewaehlt = true;
    }
 public void reload()
 {
     actionCancel();
     AttributeComponent attr = managerSys.getSelectedFigurine().GetComponent<AttributeComponent>();
     //Es wird nur nachgeladen wenn das Magazin nicht komplett voll ist
     if (attr.items.getCurrentWeapon().currentBulletsInMagazine < attr.items.getCurrentWeapon().magazineSize)
     {
         activeSkill = Enums.Actions.Reload;
         inventSys.reloadAmmo(managerSys.getSelectedFigurine());
     }
 }
    public void move()
    {
        actionCancel();

        activeSkill = Enums.Actions.Move;

        if (isPlayer1)
            player1.GetComponent<PlayerComponent>().useAP();
        else
            player2.GetComponent<PlayerComponent>().useAP();
        AttributeComponent attr = (AttributeComponent)managerSys.getSelectedFigurine().GetComponent(typeof(AttributeComponent));
        input.cancelActions();
        attr.regenerateMovepoints();
        dijkstra.executeDijsktra(attr.getCurrentCell(), attr.actMovRange, attr.weapon.GetComponent<WeaponComponent>().weaponRange);
    }
    public void heal()
    {
        actionCancel();
        activeSkill = Enums.Actions.Heal;
        HealthSystem healthSystem = GameObject.Find("Manager").GetComponent<HealthSystem>();
        if (inventSys.decreaseMedikits(GameObject.Find("Manager").GetComponent<ManagerSystem>().getSelectedFigurine()) > 0)
        {
            // Audiofeedpack wenn heilen klappt
            AudioManager.playMedikit();

            healthSystem.doHeal(null, activeUnit, HealthSystem.MEDIPACK);
        }
    }