Ejemplo n.º 1
0
    void Start()
    {
        m_customRVOMgr = new GameObject("customRVOMgr").AddComponent <CustomRVOMgr>();
        m_customRVOMgr.Init();

        for (int i = -30; i <= 30; i++)
        {
            for (int j = -1; j <= 1; ++j)
            {
                m_customRVOMgr.AddAgent(new Vector3(i, 0, j));
            }
        }

        int id = m_customRVOMgr.AddAgent(new Vector3(0, 0, -5));

        m_customRVOMgr.MoveAgent(id, new Vector3(0, 0, 5));
    }
 public void Init(int id, Vector3 pos, CustomRVOMgr mgr)
 {
     m_id = id;
     transform.position = pos;
     m_mgr = mgr;
 }