first commit
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using ParadoxNotion.Design;
|
||||
using NodeCanvas.Framework;
|
||||
|
||||
namespace NodeCanvas.Tasks.Actions
|
||||
{
|
||||
|
||||
[Category("✫ Blackboard/Dictionaries")]
|
||||
public class AddElementToDictionary<T> : ActionTask
|
||||
{
|
||||
|
||||
[BlackboardOnly]
|
||||
[RequiredField]
|
||||
public BBParameter<Dictionary<string, T>> dictionary;
|
||||
|
||||
public BBParameter<string> key;
|
||||
public BBParameter<T> value;
|
||||
|
||||
protected override string info {
|
||||
get { return string.Format("{0}[{1}] = {2}", dictionary, key, value); }
|
||||
}
|
||||
|
||||
protected override void OnExecute() {
|
||||
if ( dictionary.value == null ) {
|
||||
EndAction(false);
|
||||
return;
|
||||
}
|
||||
dictionary.value[key.value] = value.value;
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4d79bc69b7846bf4c83186d11632de43
|
||||
timeCreated: 1466908765
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 14914
|
||||
packageName: NodeCanvas
|
||||
packageVersion: 3.3.1
|
||||
assetPath: Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/Blackboard/Dictionary
|
||||
Specific/AddElementToDictionary.cs
|
||||
uploadId: 704937
|
||||
@@ -0,0 +1,35 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using ParadoxNotion.Design;
|
||||
using NodeCanvas.Framework;
|
||||
|
||||
namespace NodeCanvas.Tasks.Actions
|
||||
{
|
||||
|
||||
[Category("✫ Blackboard/Dictionaries")]
|
||||
public class GetDictionaryElement<T> : ActionTask
|
||||
{
|
||||
|
||||
[BlackboardOnly]
|
||||
[RequiredField]
|
||||
public BBParameter<Dictionary<string, T>> dictionary;
|
||||
|
||||
public BBParameter<string> key;
|
||||
|
||||
[BlackboardOnly]
|
||||
public BBParameter<T> saveAs;
|
||||
|
||||
protected override string info {
|
||||
get { return string.Format("{0} = {1}[{2}]", saveAs, dictionary, key); }
|
||||
}
|
||||
|
||||
protected override void OnExecute() {
|
||||
if ( dictionary.value == null ) {
|
||||
EndAction(false);
|
||||
return;
|
||||
}
|
||||
saveAs.value = dictionary.value[key.value];
|
||||
EndAction();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6e1ccc612605fa743a99c87bd393d0b0
|
||||
timeCreated: 1466909038
|
||||
licenseType: Store
|
||||
MonoImporter:
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
AssetOrigin:
|
||||
serializedVersion: 1
|
||||
productId: 14914
|
||||
packageName: NodeCanvas
|
||||
packageVersion: 3.3.1
|
||||
assetPath: Assets/ParadoxNotion/NodeCanvas/Tasks/Actions/Blackboard/Dictionary
|
||||
Specific/GetDictionaryElement.cs
|
||||
uploadId: 704937
|
||||
Reference in New Issue
Block a user