public void SetArrow(Direction dir, ArrowStrength strength, int playerIndex) { HasArrow = true; ArrowDirection = dir; ArrowColor = new Color(1f, 1f, 1f, 1f); arrowStrength = ArrowStrength.Big; overlayColor = PlayerCursor.PlayerColors[playerIndex]; ArrowPlayerIndex = playerIndex; UpdateOverlayGraphic(); }
public bool ToggleArrow(Direction dir, int playerIndex = 0) { HasArrow = !HasArrow; ArrowDirection = dir; arrowStrength = ArrowStrength.Big; ArrowColor = new Color(1f, 1f, 1f, HasArrow ? 1f : 0f); overlayColor = PlayerCursor.PlayerColors[playerIndex]; ArrowPlayerIndex = playerIndex; UpdateOverlayGraphic(); return(HasArrow); }
void DiminishArrow() { if (!HasArrow) { return; } else if (arrowStrength == ArrowStrength.Big) { arrowStrength = ArrowStrength.Small; UpdateOverlayGraphic(); } else { ToggleArrow(ArrowDirection); // notify players that their arrow was gone PlayerCursor.ArrowWasRemoved(this); } }