示例#1
0
        public void addNpc(NpcStructure npc)
        {
            if (npcs == null)
            {
                npcs = new List <NpcStructure>();
            }

            npcs.Add(npc);
        }
示例#2
0
文件: IrisScript.cs 项目: rokuan/iris
        public void addNpc(NpcStructure npc)
        {
            if (npcs == null)
            {
                npcs = new List<NpcStructure>();
            }

            npcs.Add(npc);
        }
示例#3
0
        public NpcStructure parseNpc()
        {
            NpcStructure npc = new NpcStructure();

            nextTokenIfEquals(Token.TokenValue.NPC);

            if (currentTokenEquals(Token.TokenValue.STRING))
            {
                npc.name = currentToken.stringValue;

                nextToken();

                nextTokenIfEquals(Token.TokenValue.LBRACE);

                while (!currentTokenEquals(Token.TokenValue.RBRACE))
                {
                    npc.addLabel(parseLabelExpression());
                }

                nextTokenIfEquals(Token.TokenValue.RBRACE);

                return npc;
            }

            return null;
        }
示例#4
0
文件: IrisData.cs 项目: rokuan/iris
 public static void addNpc(string npcName, NpcStructure npc)
 {
     npcs.Add(npcName, npc);
 }