Пример #1
0
 public bool TriggerComplete()
 {
     // This is where it should recognize a full crank has occured
     dispCounter.spawnObject();
     completeAudioSource.Play();
     return(true);
 }
    public override void OnInspectorGUI()
    {
        DrawDefaultInspector();

        DispenserCounter myScript = (DispenserCounter)target;

        if (GUILayout.Button("increment"))
        {
            myScript.increment();
        }
        if (GUILayout.Button("decrement"))
        {
            myScript.decrement();
        }
        if (GUILayout.Button("spawnObject"))
        {
            myScript.spawnObject();
        }
    }