#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(); 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]; }
/// <summary> /// /// </summary> protected override void Awake() { base.Awake(); m_Transform = transform; bl_PhotonCallbacks.PlayerEnteredRoom += OnPhotonPlayerConnected; bl_AIMananger.OnBotStatUpdate += OnBotStatUpdate; Agent = this.GetComponent <NavMeshAgent>(); AIAnim = GetComponentInChildren <bl_AIAnimation>(); AIHealth = GetComponent <bl_AIShooterHealth>(); AIWeapon = GetComponent <bl_AIShooterWeapon>(); defaultSpeed = Agent.speed; Anim = GetComponentInChildren <Animator>(); ObstacleBetweenTarget = false; CoverManager = FindObjectOfType <bl_AICovertPointManager>(); AIManager = CoverManager.GetComponent <bl_AIMananger>(); TimeManager = FindObjectOfType <bl_RoundTime>(); DrawName = GetComponent <bl_DrawName>(); m_GameMode = GetGameMode; }
#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 }