예제 #1
0
    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();
    }
예제 #2
0
 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);
 }
예제 #3
0
 public void teargas()
 {
     actionCancel();
     activeSkill = Enums.Actions.Teargas;
     input.gasAusgewaehlt = true;
 }
예제 #4
0
 public void smoke()
 {
     actionCancel();
     activeSkill = Enums.Actions.Smoke;
     input.smokeAusgewaehlt = true;
     AttributeComponent temp = managerSys.selectedFigurine.GetComponent<AttributeComponent>();
     dijkstra.executeDijsktra(temp.getCurrentCell(), 0, temp.attackRange);
 }
예제 #5
0
    public void shoot()
    {
        actionCancel();
        activeSkill = Enums.Actions.Shoot;

        input.angriffAusgewaehlt = true;
    }
예제 #6
0
 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());
     }
 }
예제 #7
0
    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);
    }
예제 #8
0
    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);
        }
    }