Пример #1
0
    public ActorModel JustCreateUIModel(int uid, int modelId, AvatarModel dataAM, bool model_active, string model_layer, Vector2 offsetlocalPos)
    {
        ActorModel actorModel = ModelPool.Instance.Get(modelId);

        if (actorModel == null)
        {
            return(null);
        }
        this.m_models.set_Item(uid, actorModel);
        actorModel.ModelType  = ActorModelType.UI;
        actorModel.ModelLayer = model_layer;
        NavMeshAgent component = actorModel.GetComponent <NavMeshAgent>();

        if (component != null)
        {
            component.set_enabled(false);
        }
        ModelDisplayManager.RefreshInitLocalPosition(actorModel, offsetlocalPos);
        actorModel.get_transform().set_localEulerAngles(new Vector3(0f, dataAM.modelProjRotateRevise, 0f));
        actorModel.get_transform().set_localScale(Vector3.get_one() * dataAM.scale);
        actorModel.ShowShadow(false, modelId);
        actorModel.ChangeToIdle();
        actorModel.get_gameObject().SetActive(model_active);
        return(actorModel);
    }