-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bde5f7
commit 837e453
Showing
16 changed files
with
683 additions
and
276 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
29 changes: 29 additions & 0 deletions
29
FlappyBird/Assets/Constellation/Plugins/Scripts/Nodes/Unity/Quit.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using UnityEngine; | ||
|
||
namespace Constellation.Unity { | ||
public class Quit : INode, IReceiver { | ||
public const string NAME = "Quit"; | ||
UnityEngine.GameObject GameObject; | ||
ISender sender; | ||
public void Setup (INodeParameters _nodeParameters) { | ||
_nodeParameters.AddInput (this, false, "Quit application"); | ||
sender = _nodeParameters.GetSender(); | ||
} | ||
|
||
public string NodeName () { | ||
return NAME; | ||
} | ||
|
||
public string NodeNamespace () { | ||
return NameSpace.NAME; | ||
} | ||
|
||
public void Set (GameObject _gameObject) { | ||
GameObject = _gameObject; | ||
} | ||
|
||
public void Receive (Variable _value, Input _input) { | ||
Application.Quit(); | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
FlappyBird/Assets/Constellation/Plugins/Scripts/Nodes/Unity/Quit.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.