#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>(); }
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); }
#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 ); }
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; }
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); }
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 ); }
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); }
/// <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); } }
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); } }
#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>(); }
#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>(); }
#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>(); }
#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 }