Team

Team
Teams controll who can damage who and the visuals of Players, intractables and other Components that implement ITeamBelong.

Team is a ScriptableObject and should be in the Resources folder under Teams. The name of the Team file should always be "Team " + team id. Team id should not be shared by any other team.

The ProjectileController compares the Team of the Player hit and the Projectile to determine if it can damage.

Teams are compared using team id.

To create a new Team, navigate to the Resources folder under Teams and right click Create/Create Team.

On the newly created Team, set a Team name, a Team color, and a unique Team id.

To have Renderers change materials and color based on team, assign InteractTeamTextures in the same folder to the TeamTextures variable.

The InteractTeamTextures contains a list of a list of Materials. The upper list is a list of all the different objects that can take materials. The lower list is the different materials for each team for that object. Where element 0 is team 1 element 1 is team 2 and so on.

Each object should have a minimum of 4 materials, one for each player.