Example #1
0
 private void btnInitTrackUpdateInitUp_Click(object sender, EventArgs e)
 {
     if (lbInitTrackName.SelectedItem != null && lbInitTrackName.SelectedIndex != 0)
     {
         InitiativeTracker.UpdateInitiativeUp(lbInitTrackName.SelectedIndex);
     }
 }
Example #2
0
 private void btnInitTrackUpdateInitDown_Click(object sender, EventArgs e)
 {
     if (lbInitTrackName.SelectedItem != null && lbInitTrackName.SelectedIndex != lbInitTrackName.Items.Count - 1)
     {
         InitiativeTracker.UpdateInitializeDown(lbInitTrackName.SelectedIndex);
     }
 }
Example #3
0
 private void btnInitTrackApplyDamage_Click(object sender, EventArgs e)
 {
     if (lbInitTrackName.SelectedItem != null)
     {
         InitiativeTracker.ApplyDamageToIndex(Int32.Parse(nudInitTrackDamageApplyer.Text), lbInitTrackName.SelectedIndex);
     }
 }
Example #4
0
 private void btnInitTrackUpdate_Click(object sender, EventArgs e)
 {
     if (lbInitTrackName.SelectedItem != null)
     {
         InitiativeTracker.UpdateInitiativeAndHPAtIndex((int)nudInitTrackInitUpdate.Value, (int)nudInitTrackHPUpdate.Value, lbInitTrackName.SelectedIndex);
     }
 }
Example #5
0
 private void btnInitTrackRemoveFromInit_Click(object sender, EventArgs e)
 {
     if (lbInitTrackName.SelectedItem != null)
     {
         InitiativeTracker.RemoveIndexFromInitiative(lbInitTrackName.SelectedIndex);
     }
 }
Example #6
0
        public InitiativeTracker ConstructorTest()
        {
            InitiativeTracker target = new InitiativeTracker();

            return(target);
            // TODO: add assertions to method Form1Test.ConstructorTest()
        }
    public void load(BoardState bs)
    {
        HexGenerator hxg = GameObject.FindObjectOfType <HexGenerator>();

        hxg.Clear();
        hxg.load(bs);

        foreach (Pawn go in GameObject.FindObjectsOfType <Pawn>())
        {
            go.tile = null;
            Destroy(go.gameObject);
        }

        InitiativeTracker it = GameObject.FindObjectOfType <InitiativeTracker>();

        it.pwn.Clear();
        List <Pawn> range = new List <Pawn>();

        foreach (PawnState go in bs.pawns)
        {
            Pawn po = GameObject.Instantiate(pawn).GetComponent <Pawn>();
            po.load(go);
            range.Add(po);
        }

        it.Start(bs.initiative, range);
    }
Example #8
0
        private void btnInitTrackEndInitiative_Click(object sender, EventArgs e)
        {
            InitiativeTracker.EndInitiative();

            btnInitTrackSortInitiative.Enabled = true;

            btnInitTrackStartInitiative.Enabled = true;
            btnInitTrackEndInitiative.Enabled   = false;
        }
Example #9
0
 internal void btnSort_Click(
     [PexAssumeUnderTest] InitiativeTracker target,
     object sender,
     EventArgs e
     )
 {
     object[] args = new object[2];
     args[0] = sender;
     args[1] = (object)e;
     Type[] parameterTypes = new Type[2];
     parameterTypes[0] = typeof(object);
     parameterTypes[1] = typeof(EventArgs);
     object result = ((MethodBase)(typeof(InitiativeTracker).GetMethod("btnSort_Click",
                                                                       BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.NonPublic, (Binder)null,
                                                                       CallingConventions.HasThis, parameterTypes, (ParameterModifier[])null)))
                     .Invoke((object)target, args);
     // TODO: add assertions to method Form1Test.btnSort_Click(Form1, Object, EventArgs)
 }
Example #10
0
 private void btnInitTrackUseHeldAction_Click(object sender, EventArgs e)
 {
     InitiativeTracker.UseHeldAction();
 }
Example #11
0
 private void btnInitTrackAddCombatant_Click(object sender, EventArgs e)
 {
     InitiativeTracker.AddCombatant();
 }
Example #12
0
 private void lbInitTrackHP_SelectedIndexChanged(object sender, EventArgs e)
 {
     InitiativeTracker.HPSelectedIndexChanged();
 }
Example #13
0
 private void btnInitTrackEndTurn_Click(object sender, EventArgs e)
 {
     InitiativeTracker.EndTurn();
 }
Example #14
0
        private void InitializeInitiativeTracker()
        {
            InitiativeTracker.InitializeInitiativeTracker(this);

            btnInitTrackEndInitiative.Enabled = false;
        }
Example #15
0
 private void btnInitTrackSortInitiative_Click(object sender, EventArgs e)
 {
     InitiativeTracker.SortInitiativeList();
 }
Example #16
0
 public async Task SendInitToDm(string groupName, InitiativeTracker pcInitRoll)
 {
     await Clients.Group(groupName).SendAsync("PlayerInitiative", pcInitRoll);
 }