public void BuyStructure(StructureBlueprint _structureBlueprint) { if (HasMoneys(_structureBlueprint.buildCost)) { GameMaster.Money -= _structureBlueprint.buildCost; structureBuilder.BuildStructure(_structureBlueprint, UIManager_battle.SelectedNode); } }
public PonyTextStructureBase Parse(string source) { builder = new StructureBuilder(); builder.StartTextStructure(PonyToken.Empty); bool result = tokenGenerator.RunGenerator(source); if (context.Count != 0) { errorListener.OnParserErrorReported("Unexpected termination", currentState, string.Empty); } if (result) { return(builder.BuildStructure()); } return(null); }