コード例 #1
0
    void    OnGUI()
    {
        if (null == pedestrian)
        {
            return;
        }

        if (GUILayout.Button("Next"))
        {
            pedestrian.Load(pedestrian.PedestrianId + 1);
            pedestrian.PlayAnim(pedestrian.AnimGroup, pedestrian.animIndex, PlayMode.StopAll);
        }

        if (GUILayout.Button("Previous"))
        {
            int newId = pedestrian.PedestrianId - 1;
            if (newId < 0)
            {
                newId = 0;
            }
            pedestrian.Load(newId);
            pedestrian.PlayAnim(pedestrian.AnimGroup, pedestrian.animIndex, PlayMode.StopAll);
        }
    }
コード例 #2
0
 private void loadModel(int id, AnimGroup group, AnimIndex index)
 {
     pedestrian.Load(id);
     pedestrian.PlayAnim(group, index, PlayMode.StopAll);
 }