public bool HasCompatibleType(IArgument argIn) { if (argIn as Variable != null) { if (CheckArgCompatibleType((argIn as Variable).GetMyData().GetType())) { return(true); } } return(CheckArgCompatibleType(argIn?.GetType())); }
private void SetCompatibleColliderState(CodeBlock cIn, bool desiredActiveState) { IArgument internalArg = cIn.GetMyIArgument(); foreach (SnapCollider sc in GetAllSnapColliders()) { if (sc.HasCompatibleType(internalArg) && !sc.MyCodeBlock.GetIsMenuBlock()) { sc.gameObject.SetActive(desiredActiveState); } } }
public int GetPositionOfArgument(IArgument iArgIn) { int index = 0; foreach (IArgument ia in codeBlockArgumentList.GetArgListAsIArguments()) { if (ia == iArgIn) { return(index); } ++index; } return(-1); }
private int FindNextSnapIndex() { for (int actionIndex = 0; actionIndex < snapChild.Length; ++actionIndex) { Type snapArgType = ConvertToSnapColClass(snapArgs[actionIndex]); if (snapArgs[actionIndex] != SNAPARGTYPES.REMOVE) { IArgument ia = snapParent[actionIndex].GetArgumentFromDict(new KeyValuePair <Type, int>(snapArgType, 0)); if (ia == null) { return(actionIndex); } } else { if (snapChild[actionIndex].FindParentCodeBlock() == snapParent[actionIndex]) { return(actionIndex); } } } return(-1); }