[PROBLEM] Delegates

Hi, im building turn base system. My question is about using static delegates. In BattleMenager i want to select new character after turn of previous, its good way to implement static delegates in Character class to notify BattleMenager that current character was EndTurn ? or is better way to to this ?

BattleMenager:

    public void EndTurn()
    {
        currentCharacter.active = false;

        SelectNextCharacter ();
    }

     public void Start()
     {
      Character.onTurnEnd += EndTurn ();
     }

Character:

    public delegate void OnTurnEnd();
    public static OnTurnEnd onTurnEnd;

    public void Update()
    {
        if (currentActionPoints == 0)
            onTurnEnd ();

    }

Privacy & Terms