コード例 #1
0
    // 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);
    }
コード例 #2
0
    // 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);
    }