Browse Source

Added Quit command to quit application

https://trello.com/c/qIVLgrDx
master
chrisgregan 10 years ago
parent
commit
86040c9d4b
  1. 27
      Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs
  2. 12
      Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs.meta

27
Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs

@ -0,0 +1,27 @@
using UnityEngine;
using System;
using System.Collections;
namespace Fungus
{
[CommandInfo("Flow",
"Quit",
"Quits the application. Does not work in Editor or Webplayer builds. Shouldn't generally be used on iOS.")]
[AddComponentMenu("")]
public class Quit : Command
{
public override void OnEnter()
{
Application.Quit();
// On platforms that don't support Quit we just continue onto the next command
Continue();
}
public override Color GetButtonColor()
{
return new Color32(235, 191, 217, 255);
}
}
}

12
Assets/Fungus/Flowchart/Scripts/Commands/Quit.cs.meta

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 3e1337544a71d4d5dab5510fe86ddca8
timeCreated: 1434462164
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Loading…
Cancel
Save