コード例 #1
0
    public void AddStorageInstructions(ref List <Instruction> instructions, ref Coordinates start, string itemType)
    {
        List <Coordinates> path;

        path = navigationServices.GetPath(start, "Storage", null, new List <string> {
            itemType
        });
        if (path == null)
        {
            Debug.LogError("No Storage available!");
            return;
        }

        Instruction instruction = new Instruction(path, "Storage");

        instruction.AddOutput(itemType);
        instructions.Add(instruction);

        start = path[path.Count - 1];
    }