Revision 6304,
658 bytes
checked in by mijoliim, 6 years ago
(diff) |
Taistelut melkein toimivat.
|
Line | |
---|
1 | using System; |
---|
2 | using System.Collections.Generic; |
---|
3 | using System.Linq; |
---|
4 | using System.Text; |
---|
5 | using Jypeli; |
---|
6 | |
---|
7 | public class EnemyGroup : List<EnemyBase> |
---|
8 | { |
---|
9 | public int EncounterProbability { get; set; } |
---|
10 | public int Max = 4; |
---|
11 | |
---|
12 | public EnemyGroup() |
---|
13 | { |
---|
14 | |
---|
15 | } |
---|
16 | public EnemyGroup(int Probability) |
---|
17 | { |
---|
18 | EncounterProbability = Probability; |
---|
19 | } |
---|
20 | |
---|
21 | |
---|
22 | public void AddEnemyToGroup(EnemyBase Enemy) |
---|
23 | { |
---|
24 | if (Count < Max) |
---|
25 | { |
---|
26 | Add(Enemy); |
---|
27 | } |
---|
28 | } |
---|
29 | |
---|
30 | bool IsFull() |
---|
31 | { |
---|
32 | if (Count >= Max) |
---|
33 | { |
---|
34 | return true; |
---|
35 | } |
---|
36 | else return false; |
---|
37 | } |
---|
38 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.