void OnCHARACTER_UI_UPDATED(object tag) { if (tag == null) { VisualizationComponent.ShowAsDefault(); return; } var character = tag as CharacterEntity; int tileIndex = Array.IndexOf(character.CurrentInteractionPath, this); if (tileIndex >= 0) { if (tileIndex == 0) { VisualizationComponent.ShowAsDestination(); return; } VisualizationComponent.ShowAsPath(); return; } else { VisualizationComponent.ShowAsDefault(); } }
IEnumerator TauntAfterStop() { while (MoveComponent.IsMoving) { yield return(new WaitForSeconds(0.5f)); } bool startedAttack = false; var neighbourPair = HolyTools.ActiveNeighbours.FirstOrDefault(x => (x.EntityA == cEntity || x.EntityB == cEntity)); if (neighbourPair != null) { var theOther = neighbourPair.EntityA == this ? neighbourPair.EntityB : neighbourPair.EntityA; if (!theOther.MoveComponent.IsMoving) { StartAttack(theOther); startedAttack = true; } } if (!startedAttack) { VisualizationComponent.SetTauntState(); } }
public void SetAsOrigin() { VisualizationComponent.HighlightHover(); }
public void Reset() { VisualizationComponent.Reset(); }
public void InitTile(int x, int y, string text) { GridTile = new Tile(x, y); VisualizationComponent.SetText(text); }
void StartAttack(CharacterEntity OtherCharacter) { VisualizationComponent.SetAttackState(); OtherCharacter.VisualizationComponent.SetAttackState(); }
public void SetInactiveUI() { StateCharacter = CharacterState.Inactive; VisualizationComponent.SetInactiveState(); }