// Use this for initialization void Start() { infectPercent = 0.0f; //Adding this entity to the manager his list of infected entity's InfectManager.addEntity(this); infectEntity(0.15f); virusMeter = transform.GetChild(0).GetChild(0).gameObject; }
// Use this for initialization void Awake() { // Make a static InfectManager, make sure there's no duplicate if (instance == null) { instance = this; } else { Destroy(this); return; } // Inititalize int totalInfected = 0; // Initialize ArrayList instance.entityViruslist = new ArrayList(); }