mirror of
https://github.com/Siccity/xNode.git
synced 2025-12-20 17:26:02 +08:00
Merge branch 'master' of https://github.com/Siccity/xNode.git
This commit is contained in:
commit
14af49468e
23
CONTRIBUTING.md
Normal file
23
CONTRIBUTING.md
Normal file
@ -0,0 +1,23 @@
|
||||
## Contributing to xNode
|
||||
💙Thank you for taking the time to contribute💙
|
||||
|
||||
If you haven't already, join our [Discord channel](https://discord.gg/qgPrHv4)!
|
||||
|
||||
## Pull Requests
|
||||
Try to keep your pull requests relevant, neat, and manageable. If you are adding multiple features, try splitting them into separate commits.
|
||||
* Avoid including irellevant whitespace or formatting changes.
|
||||
* Comment your code.
|
||||
* Spell check your code / comments
|
||||
|
||||
## New features
|
||||
xNode aims to be simple and extendible, not trying to fix all of Unity's shortcomings.
|
||||
|
||||
If your feature aims to cover something not related to editing nodes, it generally won't be accepted. If in doubt, ask on the Discord channel.
|
||||
|
||||
## Coding conventions
|
||||
Skim through the code and you'll get the hang of it quickly.
|
||||
* Methods, Types and properties PascalCase
|
||||
* Variables camelCase
|
||||
* Public methods XML commented
|
||||
* Open braces on same line as condition
|
||||
* 4 spaces for indentation.
|
||||
@ -9,8 +9,15 @@ namespace XNode {
|
||||
public enum IO { Input, Output }
|
||||
|
||||
public int ConnectionCount { get { return connections.Count; } }
|
||||
/// <summary> Return the first connection </summary>
|
||||
public NodePort Connection { get { return connections.Count > 0 ? connections[0].Port : null; } }
|
||||
/// <summary> Return the first non-null connection </summary>
|
||||
public NodePort Connection {
|
||||
get {
|
||||
for (int i = 0; i < connections.Count; i++) {
|
||||
if (connections[i] != null) return connections[i].Port;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public IO direction { get { return _direction; } }
|
||||
public Node.ConnectionType connectionType { get { return _connectionType; } }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user