/// <summary> /// Makes the character shoot in a direction. Bullets will stop on collision. /// </summary> /// <param name="character">Character.</param> /// <param name="direction">Direction. eg. (CharacterShoot(player0, TileClass.NORTH))</param> public void CharacterShoot(GameObject character, int direction) { CharacterActionsClass cac = character.GetComponent <CharacterActionsClass>(); if (cac != null) { cac.Shoot(direction); } }
/// <summary> /// Makes the character attack in all four adjacent spaces. /// </summary> /// <param name="character">Character.</param> public void CharacterSwipe(GameObject character) { CharacterActionsClass cac = character.GetComponent <CharacterActionsClass>(); if (cac != null) { cac.Swipe(); } }