public void Awake() { if (instance == null) { instance = this; } }
void Awake() { instance = this; List <string> headerList = new List <string> { "Effect/zanngeki/kirisaki." }; List <int> maxList = new List <int> { 40 }; int headerIdx = 0; foreach (string header in headerList) { List <Sprite> spriteList = new List <Sprite>(); for (int i = 0; i < maxList[headerIdx]; i++) { spriteList.Add( (Sprite)Resources.Load <Sprite>(header + i) ); } ValueList vl = new ValueList(spriteList); _imageList.Add(vl); headerIdx++; } }
public override Effect GetEffect(EffectMakerPerspective perspective, bool buff) { if (perspective.Phase == Phase.StartOfGame && perspective.Card.Zone == Zone.PutOff) { return(new StartInDeckEffect()); } if (state == 0 && perspective.IsPlayed() && buff) { ++state; return(new HealEffect(5)); } if (state == 1 && perspective.IsPlayed() && !buff) { ++state; return(new AttackEffect(5)); } if (state == 2 && perspective.IsPlayed() && !buff) { ++state; revealEffect = new RevealRandomEffect(Zone.Hand); return(revealEffect); } if (state == 3) { if (stolenMaker == null && revealEffect.Revealed != null) { stolenMaker = revealEffect.Revealed.Type.Effects(); } if (perspective.IsEnded()) { state = 0; revealEffect = null; stolenMaker = null; return(new EndEffect()); } if (perspective.IsPlayed() && stolenMaker != null) { return(stolenMaker.GetEffect(perspective, buff)); } } return(null); }
public override Effect GetEffect(EffectMakerPerspective perspective, bool buff) { if (perspective.Phase == Phase.StartOfGame && perspective.Card.Zone == Zone.PutOff) { return(new StartInDeckEffect()); } if (state == 0 && perspective.IsPlayed() && !buff) { ++state; return(new AttackEffect(5)); } if (state == 1 && perspective.IsPlayed() && !buff) { ++state; moveEffect = new MoveRandomEffect(Zone.Deck, Zone.Pile); return(moveEffect); } if (state == 2) { if (stolenMaker == null && moveEffect.Moved != null) { stolenMaker = moveEffect.Moved.Type.Effects(); } if (perspective.IsEnded()) { state = 0; moveEffect = null; stolenMaker = null; return(new EndEffect()); } if (perspective.IsPlayed() && stolenMaker != null) { return(stolenMaker.GetEffect(perspective, buff)); } } return(null); }