public void AddMonster(Monster m) { MonsterTreeNode n = new MonsterTreeNode(m); monsterList.Nodes.Add(n); monsterList.NodeMouseDoubleClick += (object sender, TreeNodeMouseClickEventArgs e) => { ((MonsterTreeNode)e.Node).Monster.GetPane(this).Show(); }; }
public MonsterStatsPane(MainUI parent, Monster m) { InitializeComponent(); ParentUI = parent; Monster = m; updateStats(); }
public Monster GetMonster() { Monster m = new Monster(SpawnPoint, name.Text, race.Text, Int16.Parse(level.Text), Int16.Parse(hp.Text)); m.Str = Int16.Parse(str.Text); m.Dex = Int16.Parse(dex.Text); m.Wis = Int16.Parse(wis.Text); m.Con = Int16.Parse(con.Text); m.Int = Int16.Parse(Int.Text); m.Cha = Int16.Parse(cha.Text); m.Ac = Int16.Parse(ac.Text); m.Fort = Int16.Parse(fort.Text); m.Ref = Int16.Parse(Ref.Text); m.Will = Int16.Parse(will.Text); m.Spd = Int16.Parse(spd.Text); return m; }
public MonsterTreeNode(Monster m) : base(m.Name) { Monster = m; }
//Precondition: x and y are within Grid bounds public void AddMonster(Monster m) { this.Grid[m.x, m.y] = m; this.ParentUI.AddMonster(m); this.Refresh(); }
private void okayBtn_Click(object sender, EventArgs e) { this.Result = GetMonster(); this.Close(); }