private void AddBuildCommand() { BuildCommandArgs args = new BuildCommandArgs(node); Step step = new Step(typeof(BuildCommand), args); stepList.Add(step); }
public bool Initialize(ICommandArgs args) { BuildCommandArgs commandArgs = args as BuildCommandArgs; if (commandArgs == null) { Abort(); throw new UnityException("Wrong type of args"); } buildable = commandArgs.node.GetBlock().GetComponent <Buildable>(); if (!buildable) { Abort(); Debug.LogError("Tried to build a non buildable object"); return(false); } TickSystem.Subscribe(Build); return(true); }