slimecing

a fighting game featuring slimes and swords
Log | Files | Refs | README

PublicStatHandler.cs (768B)


      1 using System.Collections;
      2 using System.Collections.Generic;
      3 using UnityEngine;
      4 
      5 
      6 public class PublicStatHandler : MonoBehaviour {
      7 
      8     public PlayerInputs[] Inputs;
      9     public List<int> controllers;
     10     public int amountOfPlayers = 3;
     11     public int health = 1;
     12     public List<GameObject> slimes;
     13     public List<GameObject> hats;
     14     public List<GameObject> swords;
     15     public List<GameObject> colours;
     16 
     17     public static PublicStatHandler instance;
     18 
     19     void Awake()
     20     {
     21         
     22         if (instance == null)
     23             instance = this;
     24         else
     25         {
     26             Destroy(gameObject);
     27             return;
     28         }
     29         DontDestroyOnLoad(gameObject);
     30     }
     31 
     32     public static PublicStatHandler GetInstance()
     33     {
     34         return instance;
     35     }
     36 }