public virtual void OnServerFixedUpdateBaseTime(float dt) { var onTime = 0f; if (m_CountDownFixedTimeSync.UpdateTime(dt, out onTime)) { // Server sync data OnServerFixedUpdateSynData(dt); // Update client RpcFixedUpdateClientSyncTime(onTime); } }
public virtual void OnServerFixedUpdateBaseTime(float dt) { var onTime = 0f; if (m_CountDownFixedTimeSync.UpdateTime(dt, out onTime)) { // Update sync data m_MovePosition = m_ObjectSyn.GetMovePosition(); m_Position = m_ObjectSyn.GetPosition(); m_Rotation = m_ObjectSyn.GetRotation(); // Server sync data OnServerFixedUpdateSynData(dt); // Update client RpcFixedUpdateClientSyncTime(onTime); } }
private void UpdateChatText() { if (string.IsNullOrEmpty(owner.GetChat()) == false && m_ChatQueue.Contains(owner.GetChat()) == false) { this.ShowChat(owner.GetChat()); } if (m_ChatQueue.Count != m_ChatTextIndex) { m_ChatTextCountdown.Reset(); m_UIObjChatText.text = this.FormatChatText(m_ChatQueue[m_ChatTextIndex]); m_ChatTextIndex++; } else if (m_ChatTextCountdown.UpdateTime(Time.deltaTime)) { m_UIObjChatText.text = string.Empty; } }
private void UpdateEmotionImage() { if (string.IsNullOrEmpty(owner.GetEmotion()) == false && m_EmotionQueue.Contains(owner.GetEmotion()) == false) { this.ShowEmotion(owner.GetEmotion()); } if (m_EmotionQueue.Count != m_EmotionIndex) { m_EmotionCountdown.Reset(); m_UIEmotionImage.gameObject.SetActive(true); m_UIEmotionImage.sprite = CUtil.FindResourceSprite(this.FormatEmotionText(m_EmotionQueue[m_EmotionIndex])); m_EmotionIndex++; } else if (m_EmotionCountdown.UpdateTime(Time.deltaTime)) { m_UIEmotionImage.gameObject.SetActive(false); } }