Esempio n. 1
0
    //Maybe also store Speed?? or something like that?
    public GameInstantState(Vector3 in_vPosition, Vector3 in_vEulerAngles, string in_szInputSate = "Still", bool in_bSetToZero = false)
    {
        m_vPosition            = in_vPosition;
        m_vRotationEulerAngles = in_vEulerAngles;

        m_dtTimeGenerated = CGlobals.GetGlobalTime(); //The time this message is generated
        m_szInput         = in_szInputSate;           //Or the name of the default value.
    }
Esempio n. 2
0
 public GameInstantState(string in_szMessageContent)
 {
     //3 of the first vec3, 3 of the second one, and 1 for Input and 1 for DateTime
     string [] tmpValue = in_szMessageContent.Split("\t".ToCharArray(), 3 + 3 + 2);     //4, as described in User_Update type of message.
     if (tmpValue.Length != (3 + 3 + 2))
     {
         Debug.LogError("ERROR, the format of the string to construct the GameInstantState was not correct, it was: " + in_szMessageContent);
         m_vPosition            = Vector3.zero;
         m_vRotationEulerAngles = Vector3.forward;
         m_dtTimeGenerated      = CGlobals.GetGlobalTime(); //The time this message is generated
         m_szInput = "Still";                               //Or the name of the default value.
     }
     else
     {
         m_vPosition.x            = float.Parse(tmpValue[0]);
         m_vPosition.y            = float.Parse(tmpValue[1]);
         m_vPosition.z            = float.Parse(tmpValue[2]);
         m_vRotationEulerAngles.x = float.Parse(tmpValue[3]);
         m_vRotationEulerAngles.y = float.Parse(tmpValue[4]);
         m_vRotationEulerAngles.z = float.Parse(tmpValue[5]);
         m_dtTimeGenerated        = DateTime.Parse(tmpValue[6]); //The time this message is generated
         m_szInput = tmpValue[7];                                //Or the name of the default value.
     }
 }
Esempio n. 3
0
    public DateTime m_dtTimeSinceLastHeartBeat; //used to decide if that client must be considered DISCONNECTED.

    public ClientTimers(bool bTrue = true)
    {
        m_dtTimeSinceLastHeartBeat = m_dtTimeSinceLastMessage = CGlobals.GetGlobalTime();
    }