public static bool CheckCanEquip(EquipShortcut equipShortcut, Combatant combatant)
{
return equipShortcut.CanEquip(combatant);
}
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GamingIsLove.Makinom.Schematics;
using GamingIsLove.Makinom;
using GamingIsLove.ORKFramework;
using GamingIsLove.Makinom.Schematics.Nodes;
using System.Linq;
[EditorHelp("Check Can Equip", "CombatantがEquipShortcutを装備可能か", "")]
// INFO: The 'NodeInfo' attribute manages in which section the node can be found in the add node selection.
[NodeInfo("CustomNode")]
public class ORKCustomNodeCheckCanEquipToCombatant : BaseSchematicCheckNode
{
[EditorTitleLabel("Combatant")]
public SchematicObjectSelection usedObject = new SchematicObjectSelection();
[EditorTitleLabel("Equipment")]
public SchematicObjectSelection usedEquipment = new SchematicObjectSelection(SchematicObjectType.SelectedData);
public override void Execute(Schematic schematic)
{
var combatant = this.usedObject.GetCombatant(schematic);
var currentEquipmentList = usedEquipment.selectedData;
if (currentEquipmentList == null) schematic.NodeFinished(this.nextFail);
var currentEquipment = currentEquipmentList.GetSelectedData(schematic).FirstOrDefault() as EquipShortcut;
if (currentEquipment.CanEquip(combatant))schematic.NodeFinished(this.next);
else schematic.NodeFinished(this.nextFail);
}
}
public SchematicObjectSelection usedEquipment = new SchematicObjectSelection(SchematicObjectType.SelectedData);
It looks like you're new here. If you want to get involved, click one of these buttons!
2) Use SelectedData instead:
public SelectedData<SchematicObjectSelection> selectedData = new SelectedData<SchematicObjectSelection>();
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!