Beispiel #1
0
 public NodeState Tick <TNodeBlob, TBlackboard>(int index, ref TNodeBlob blob, ref TBlackboard bb)
     where TNodeBlob : struct, INodeBlob
     where TBlackboard : struct, IBlackboard
 {
     LongWriter.Write(index, ref blob, ref bb, (int)SingleReader.Read(index, ref blob, ref bb));
     return(NodeState.Success);
 }
Beispiel #2
0
        public NodeState Tick <TNodeBlob, TBlackboard>(int index, ref TNodeBlob blob, ref TBlackboard bb)
            where TNodeBlob : struct, INodeBlob
            where TBlackboard : struct, IBlackboard
        {
            var inputValue = ReadInputActionValue <InputLookNode, Vector2, TNodeBlob, TBlackboard>(index, ref blob, ref bb);

            if (!inputValue.HasValue)
            {
                return(NodeState.Failure);
            }
            Output.Write(index, ref blob, ref bb, inputValue.Value);
            return(NodeState.Success);
        }