Пример #1
0
#pragma warning disable 0414

    protected override void Awake()
    {
        base.Awake();

        if (!PhotonNetwork.connected)
        {
            Destroy(this);
        }

        //FirstUpdate = false;
        if (!this.isMine)
        {
            if (HeatTarget.gameObject.activeSelf == false)
            {
                HeatTarget.gameObject.SetActive(true);
            }
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl    = new PhotonTransformViewScaleControl(m_ScaleModel);
        Controller        = this.GetComponent <bl_PlayerMovement>();
        Settings          = this.GetComponent <bl_PlayerSettings>();
        PDM      = this.GetComponent <bl_PlayerDamageManager>();
        DrawName = this.GetComponent <bl_DrawName>();
    }
Пример #2
0
 private void Awake()
 {
     this.m_PhotonView      = (PhotonView)((Component)this).GetComponent <PhotonView>();
     this.m_PositionControl = new PhotonTransformViewPositionControl(this.m_PositionModel);
     this.m_RotationControl = new PhotonTransformViewRotationControl(this.m_RotationModel);
     this.m_ScaleControl    = new PhotonTransformViewScaleControl(this.m_ScaleModel);
 }
Пример #3
0
#pragma warning disable 0414


    protected override void Awake()
    {
        base.Awake();
        if (!PhotonNetwork.connected)
        {
            Destroy(this);
        }

        //FirstUpdate = false;
        if (!this.isMine)
        {
            if (HeatTarget.gameObject.activeSelf == false)
            {
                HeatTarget.gameObject.SetActive(true);
            }
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl    = new PhotonTransformViewScaleControl(m_ScaleModel);
        Controller        = GetComponent <bl_FirstPersonController>();
        Settings          = GetComponent <bl_PlayerSettings>();
        PDM           = GetComponent <bl_PlayerDamageManager>();
        DrawName      = GetComponent <bl_DrawName>();
        RoomMenu      = FindObjectOfType <bl_RoomMenu>();
        m_CController = GetComponent <CharacterController>();
        FrienlyFire   = (bool)PhotonNetwork.room.CustomProperties[PropertiesKeys.RoomFriendlyFire];
    }
    void Awake()
    {
        this.m_PhotonView = this.GetComponent<PhotonView>();

        this.m_PositionControl = new PhotonTransformViewPositionControl(this.m_PositionModel );
        this.m_RotationControl = new PhotonTransformViewRotationControl(this.m_RotationModel );
        this.m_ScaleControl = new PhotonTransformViewScaleControl(this.m_ScaleModel );
    }
Пример #5
0
    void Awake()
    {
        m_PhotonView = GetComponent <PhotonView>();

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl    = new PhotonTransformViewScaleControl(m_ScaleModel);
    }
    void Awake()
    {
        this.m_PhotonView = GetComponent <PhotonView>();

        this.m_PositionControl = new PhotonTransformViewPositionControl(this.m_PositionModel);
        this.m_RotationControl = new PhotonTransformViewRotationControl(this.m_RotationModel);
        this.m_ScaleControl    = new PhotonTransformViewScaleControl(this.m_ScaleModel);

        netColor = this.gameObject.GetComponent <Renderer>().material.color;
    }
Пример #7
0
    void Reset()
    {
        Debug.Log("Reset");
        m_PositionModel = new PhotonTransformViewPositionModel();
        m_RotationModel = new PhotonTransformViewRotationModel();
        m_ScaleModel    = new PhotonTransformViewScaleModel();

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl    = new PhotonTransformViewScaleControl(m_ScaleModel);
    }
Пример #8
0
	void Reset()
	{
		Debug.Log("Reset");
		m_PositionModel =  new PhotonTransformViewPositionModel();
		m_RotationModel = new PhotonTransformViewRotationModel();
		m_ScaleModel = new PhotonTransformViewScaleModel();

		m_PositionControl = new PhotonTransformViewPositionControl( m_PositionModel );
		m_RotationControl = new PhotonTransformViewRotationControl( m_RotationModel );
		m_ScaleControl = new PhotonTransformViewScaleControl( m_ScaleModel );
	}
Пример #9
0
    private void Awake()
    {
        if (!PhotonNetwork.connected)
        {
            Destroy(this);
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl    = new PhotonTransformViewScaleControl(m_ScaleModel);
    }
Пример #10
0
 /// <summary>
 /// 
 /// </summary>
 void Awake()
 {
     if (Sync)
     {
         if (!view.ObservedComponents.Contains(this))
         {
             view.ObservedComponents.Add(this);
         }
         m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
         m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
         m_ScaleControl = new PhotonTransformViewScaleControl(m_ScaleModel);
     }
 }
 /// <summary>
 ///
 /// </summary>
 void Awake()
 {
     if (Sync)
     {
         if (!view.ObservedComponents.Contains(this))
         {
             view.ObservedComponents.Add(this);
         }
         m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
         m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
         m_ScaleControl    = new PhotonTransformViewScaleControl(m_ScaleModel);
     }
 }
Пример #12
0
    void Awake()
    {
        this.m_PhotonView      = GetComponent <PhotonView>();
        this.m_PositionControl = new PhotonTransformViewPositionControl(this.m_PositionModel);

        //处理多个子物体的旋转
        m_ChildTransformArray = targetTransform.GetComponentsInChildren <Transform>();
        Debug.Log(m_ChildTransformArray.Length);
        m_RotationControlArray = new PhotonTransformViewRotationControl[m_ChildTransformArray.Length];
        for (int i = 0; i < m_RotationControlArray.Length; i++)
        {
            m_RotationControlArray[i] = new PhotonTransformViewRotationControl(this.m_RotationModel);
        }
    }
Пример #13
0
#pragma warning disable 0414


     void Awake()
    {
        if (!PhotonNetwork.connected)
            Destroy(this);

        if (!this.isMine)
        {
            if (HeatTarget.gameObject.activeSelf == false)
            {
                HeatTarget.gameObject.SetActive(true);
            }
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl = new PhotonTransformViewScaleControl(m_ScaleModel);
        Controller = this.GetComponent<bl_PlayerMovement>();
    }
Пример #14
0
#pragma warning disable 0414


    void Awake()
    {
        if (!PhotonNetwork.connected)
        {
            Destroy(this);
        }

        if (!this.isMine)
        {
            if (HeatTarget.gameObject.activeSelf == false)
            {
                HeatTarget.gameObject.SetActive(true);
            }
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl    = new PhotonTransformViewScaleControl(m_ScaleModel);
        Controller        = this.GetComponent <bl_PlayerMovement>();
    }
Пример #15
0
#pragma warning disable 0414

    protected override void Awake() {
        base.Awake();

        if (!PhotonNetwork.connected)
            Destroy(this);

        //FirstUpdate = false;
        if (!this.isMine) {
            if (HeatTarget.gameObject.activeSelf == false)
                HeatTarget.gameObject.SetActive(true);
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl = new PhotonTransformViewScaleControl(m_ScaleModel);
        Controller = this.GetComponent<bl_PlayerMovement>();
        Settings = this.GetComponent<bl_PlayerSettings>();
        PDM = this.GetComponent<bl_PlayerDamageManager>();
        DrawName = this.GetComponent<bl_DrawName>();
    }
Пример #16
0
#pragma warning disable 0414


    protected override void Awake()
    {
        base.Awake();
        bl_PhotonCallbacks.PlayerEnteredRoom += OnPhotonPlayerConnected;
        if (!PhotonNetwork.IsConnected)
        {
            Destroy(this);
        }
        if (!PhotonNetwork.InRoom)
        {
            return;
        }

        //FirstUpdate = false;
        if (!isMine)
        {
            if (HeatTarget.gameObject.activeSelf == false)
            {
                HeatTarget.gameObject.SetActive(true);
            }
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        Controller        = GetComponent <bl_FirstPersonController>();
        PDM           = GetComponent <bl_PlayerDamageManager>();
        DrawName      = GetComponent <bl_DrawName>();
        m_CController = GetComponent <CharacterController>();
        FrienlyFire   = (bool)PhotonNetwork.CurrentRoom.CustomProperties[PropertiesKeys.RoomFriendlyFire];
#if UMM
        MiniMapItem = this.GetComponent <bl_MiniMapItem>();
        if (isMine && MiniMapItem != null)
        {
            MiniMapItem.enabled = false;
        }
#endif
    }