// brief Call this once a GameObject has detected a collision public void OnCollision() { GameObject fireGrid = new GameObject(); fireGrid.name = "FireGrid"; FireGrid grid = fireGrid.AddComponent <FireGrid>(); fireGrid.AddComponent <FireGrassRemover>(); grid.IgniterUpdate(m_firePrefab, gameObject.transform.position, m_gridWidth, m_gridHeight); }
// brief Call this once a GameObject has detected a collision public void OnCollision() { GameObject fireGrid = new GameObject(); fireGrid.name = "FireGrid"; grid = fireGrid.AddComponent <FireGrid>(); fireGrid.AddComponent <FireGrassRemover>(); emitter = GetComponent <FMODUnity.StudioEventEmitter>(); if (emitter == null) { Debug.Log("Unable to create FMOD_StudioEventEmitter on " + gameObject.name); } grid.IgniterUpdate(m_firePrefab, gameObject.transform.position, m_gridWidth, m_gridHeight); }