Implement BattleEffects, add Thunderstorm
This commit is contained in:
parent
fc427bd276
commit
00448fe919
20 changed files with 215 additions and 18 deletions
34
Assets/Battle/PlayArea.cs
Normal file
34
Assets/Battle/PlayArea.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class PlayArea
|
||||
{
|
||||
public delegate void PlayAreaChangedAction();
|
||||
public event PlayAreaChangedAction OnPlayAreaChanged;
|
||||
|
||||
private List<BaseCard> heroPermanents;
|
||||
|
||||
public PlayArea() {
|
||||
this.heroPermanents = new List<BaseCard>();
|
||||
}
|
||||
|
||||
public List<BaseCard> GetHeroPermanents() {
|
||||
return heroPermanents;
|
||||
}
|
||||
|
||||
public void AddPlayedHeroPermanent(BaseCard permanent) {
|
||||
this.heroPermanents.Add(permanent);
|
||||
TriggerPlayAreaChanged();
|
||||
}
|
||||
|
||||
public void RemoveHeroPermanent(BaseCard permanent) {
|
||||
this.heroPermanents.Remove(permanent);
|
||||
TriggerPlayAreaChanged();
|
||||
}
|
||||
|
||||
private void TriggerPlayAreaChanged() {
|
||||
if (OnPlayAreaChanged != null) OnPlayAreaChanged();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue