Using victory conditions

Victory_Conditions

  1. Add a default Victory condition on the GameBoard GameObject.
  2. Configure the Victory condition on the inspector.
  3. More than one Victory Condition can be added.

You can add a handler to the OnGameOver event on the Game Manager to execute code. Note that it will only be called when all the players have a victory states assigned. To know who won or lost, look at the Winners and Loosers property in the game manager.

In the below example, a player wins when three pieces are connected in a verticle or horizotal line.

VictoryConditions

To check out this example:

  1. Import Abstract Strategy in a new project.
  2. Import the package below into the same project.
  3. Open the VictoryConditions scene.

VictoryConditions.unitypackage

Scroll to Top