예제 #1
0
    void CreateModel(int id, int model, int mapx, int mapy, Vector3 vec, bool playBornFX = true)
    {

        EntityMonster entity = new EntityMonster();
        entity.ID = (uint)id;
        entity.model = model;
        Vector3 Point = new Vector3();
        MogoUtils.GetPointInTerrain((float)mapx / 100, (float)mapy / 100, out Point);
        entity.PlayBornFX = playBornFX;
        entity.BillBoard = false;
        entity.position = Point;
        entity.rotation = vec;
        entity.CreateModel();
        EventDispatcher.AddEventListener<GameObject, Vector3>(MogoMotor.ON_MOVE_TO, entity.OnMoveTo);
        m_entityList[id] = entity;
    }