示例#1
0
    /// <summary>
    /// 设置渲染目标
    /// </summary>
    private void SetTarget()
    {
        ModelMouseHandler handler       = m_RawImage.gameObject.GetOrAddComponent <ModelMouseHandler>();
        RectTransform     rectTransform = m_RawImage.GetComponent <RectTransform>();
        HumanoidComponent ui3dHumanoid  = m_Model.GetComponentInChildren <HumanoidComponent>();

        handler.SetData(m_ModelRoot, m_Dragable, m_RotateSpeed, m_Lookat, m_ModelCamera, rectTransform, ui3dHumanoid);
    }
示例#2
0
    /// <summary>
    /// 设置渲染目标
    /// </summary>
    /// <param name="target"></param>
    private void SetTarget()
    {
        ModelMouseHandler handler       = RawImageComponent.gameObject.GetOrAddComponent <ModelMouseHandler>();
        RectTransform     rectTransform = RawImageComponent.GetComponent <RectTransform>();
        HumanoidComponent ui3dHumanoid  = ModelArray != null && ModelArray.Length > 0 ? ModelArray[0].GetComponentInChildren <HumanoidComponent>() : null;
        Camera            camera        = m_LightEnvirontment.GetComponentInChildren <Camera>();

        handler.SetData(ModelBox, m_Dragable, m_RotateSpeed, m_Lookat, camera, rectTransform, ui3dHumanoid);
    }
 /// <summary>
 /// 填充数据
 /// </summary>
 /// <param name="targetModel">旋转目标模型</param>
 /// <param name="dragable">是否拖拽</param>
 /// <param name="rotateSpeed">旋转速度</param>
 /// <param name="lookat">是否LOOKAT</param>
 /// <param name="modelCamera">模型相机</param>
 /// <param name="rawImageTransform">RawImage</param>
 /// <param name="ui3dHumanoid">模型动作控制脚本</param>
 public void SetData(Transform targetModel, bool dragable, float rotateSpeed, bool lookat, Camera modelCamera,
                     RectTransform rawImageTransform, HumanoidComponent ui3dHumanoid)
 {
     m_TargetModel       = targetModel;
     m_Dragable          = dragable;
     m_RotateSpeed       = rotateSpeed;
     m_Lookat            = lookat;
     m_ModelCamera       = modelCamera;
     m_RawImageTransform = rawImageTransform;
     m_Ui3dHumanoid      = ui3dHumanoid;
 }
示例#4
0
文件: Game.cs 项目: DenDev-B/Invasion
    private void dellPlayer()
    {
        // Debug.Log("You dell ");
        Setting sett = PVPBattle.instance.player.GetComponent <Setting>();

        sett.view.GetComponent <Animator>().SetBool("dead", true);

        if (Bots)
        {
            bKill++;
            photonView.RPC("resetKillCommand", PhotonTargets.All, aKill, bKill);
        }
        //PhotonView pv  = PVPBattle.instance.player.GetComponent<PhotonView>();
        //  pv.enabled = false;

        ActiveComponent ac = PVPBattle.instance.player.GetComponent <ActiveComponent>();

        ac.enabled = false;

        HumanoidComponent hc = PVPBattle.instance.player.GetComponent <HumanoidComponent>();

        hc.enabled = false;

        NetworkPlayer np = PVPBattle.instance.player.GetComponent <NetworkPlayer>();

        np.enabled = false;

        sett.GetComponent <HumanoidComponent>().enabled = false;
        GameObject.FindGameObjectWithTag("App").GetComponent <Boot>().DownPanel.GetComponent <HeroButtons>().clearBttn();
        PVPBattle.instance.player.tag  = "Box";
        PVPBattle.instance.player.name = "Trup";

        //   sett.GetComponent<LifeComponent>().enabled = false;
        sett.enabled = false;
        SpawnPlayer();
    }