Role.Description

From Intrigues Wiki

Role Class - Description Property

Overview

The Description property in the Role class provides a detailed explanation of a character's role within the game.

Syntax

[field: SerializeField] public string Description { get; private set; }

Description

This property conveys the responsibilities, significance, and general characteristics of a role. It's used to give players and developers a clear understanding of what a particular role entails.

Usage

Description is useful for game UI elements that need to provide more information about a character's role, and for in-game logic where the characteristics of a role need to be considered.

Example of Usage

public class RoleInfoDisplay : MonoBehaviour {
    void Start() {
        // Access the player's role
        var playerRole = IM.Player.Role;

        if (playerRole != null) {
            // Output the description of the player's role
            Debug.Log($"Role Description: {playerRole.Description}");
        }
    }
}

Remarks

  • This property is vital for giving context and background to roles, enhancing player immersion and understanding.
  • Can be used in various UI elements like tooltips, character sheets, or dialogue boxes to provide detailed information about a role.