コード例 #1
0
    public void BuyStructure(StructureBlueprint _structureBlueprint)
    {
        if (HasMoneys(_structureBlueprint.buildCost))
        {
            GameMaster.Money -= _structureBlueprint.buildCost;

            structureBuilder.BuildStructure(_structureBlueprint, UIManager_battle.SelectedNode);
        }
    }
コード例 #2
0
        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);
        }