/// <summary> /// Wait a little for move actions. /// Set boarc touchable again. /// </summary> /// <returns></returns> private IEnumerator Move() { yield return(new WaitForSeconds(1.5f)); SetBoardTouchable?.Invoke(); DeselectHexagons(); }
/// <summary> /// Used for non player match element input. /// First set board untouchable. Send null match element and get explode event. /// If there wont be any explosion then we can set board touchable and return. If there will be any explosion then set these explosions. /// </summary> public void SetMatchElement() { SetBoardUnuouchable?.Invoke(); MatchElement matchElement = new MatchElement(); ExplodeEvent explodeEvent = hexagonLogic.Explode(matchElement); if (!explodeEvent.IsActionValid) { SetBoardTouchable?.Invoke(); return; } SetExplosion(explodeEvent); }