HunterGamePlayerScoreCounter.cs 546 B

12345678910111213141516
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class HunterGamePlayerScoreCounter
  5. {
  6. public int[] hitScores = {0, 0};
  7. ChallengeGameModeLocalPK gameModeLocalPK;
  8. public HunterGamePlayerScoreCounter(ChallengeGameModeLocalPK gameModeLocalPK) {
  9. this.gameModeLocalPK = gameModeLocalPK;
  10. GameEventCenter.ins.onTargetAnimalHurt += (a, hurtValue) => {
  11. int playerIndex = gameModeLocalPK.GetCurrentPlayIndex();
  12. hitScores[playerIndex] += hurtValue;
  13. };
  14. }
  15. }