void Awake() { gameControl = GetComponent <TurnBasedBattle>(); // Set up the reference. anim = UICanvas.GetComponent <Animator> (); audioSource = GetComponent <AudioSource> (); }
public void Start_WhenFinished_BattleIsOver() { // Arrange // characters will attack for one damage each turn until they die var characters = new[] { CreateCharacter("a"), CreateCharacter("b"), }; var battle = new TurnBasedBattle( new MoveProcessor(), new Mock <IActionHistory>().Object, new Mock <IGameOutput>().Object, characters); // Act battle.Start(); // Assert Assert.That(battle.IsOver, Is.True); }
// Use this for initialization void Start() { playerSpecial = GameObject.Find("PlayerSpecial").GetComponent <PlayerSpecial> (); gameControl = GameObject.Find("GameControl").GetComponent <TurnBasedBattle> (); }
// Use this for initialization void Start() { gameControl = GameObject.Find("GameControl").GetComponent <TurnBasedBattle>(); Destroy(gameObject, destroyTime); }
// Use this for initialization void Awake() { gameControl = GameObject.Find("GameControl").GetComponent <TurnBasedBattle>(); spriteRenderer = GetComponent <SpriteRenderer> (); }