Пример #1
0
    void NPC01Init()
    {
        NPCAI ai = NPC01.GetComponent <NPCAI>();

        ai.addNPCState(); //add empty state 0
        ai.setNPCState(0, 0, "This is the forst state.", null, .5f);
        ai.setNPCState(0, 1, "This is the first target state.", null, .5f);
        ai.setNPCState(0, 2, "This is the Second target state.", null, .5f);
        ai.setNPCState(0, 3, "This is the third target state.", null, .5f);
        ai.setNPCState(0, 4, "This is the fourth target state.", null, .5f);

        ai.addNPCState(); //add empty state 1
        ai.setNPCState(1, 0, "his is the first target state.", null, .5f);
        ai.setNPCState(1, 1, "This is the first target state.", null, .5f);
        ai.setNPCState(1, 2, "This is the Second target state.", null, .5f);
        ai.setNPCState(1, 3, "This is the third target state.", null, .5f);
        ai.setNPCState(1, 4, "This is the fourth target state.", null, .5f);
    }