Example #1
0
        //making a timeObj that manages this slice of time
        public TimeObj(DateTime dt, TimeObjFactory tof)
        {
            this.tof = tof;

            m_Date      = dt; //make key useful ... Remove for micro usefullnes
            m_Secs      = TMsingleton.SecsSinceMidnight(dt);
            m_EpochSecs = dt.ConvertToUnixTimestamp();

            //m_GameObjects = new Dictionary <EtcMgr.TimeType, Transform>();
            //m_Events = new Dictionary <EventType, Event>();
            //m_Contacts = new Dictionary <object, TimeObj>();

            if (dump)
            {
                U.Log(Dump());
            }
        }
Example #2
0
 public static Vector3 getPosition(DateTime dt)
 {
     return(new Vector3(0, 0, -TMsingleton.SecsSinceMidnight(dt) * EtcMgr.secondDepthZ));
 }
Example #3
0
 //the distance of an event from the start position of the day
 public static float MidnightOffset(DateTime dt)  // Z offset midnight to dt
 {
     return((float)(TMsingleton.SecsSinceMidnight(dt) * EtcMgr.secondDepthZ));
 }
Example #4
0
 //making a timeObj that manages all time
 public TimeObj(DateTime dt)
 {
     m_Date      = dt;
     m_Secs      = TMsingleton.SecsSinceMidnight(dt);
     m_EpochSecs = dt.ConvertToUnixTimestamp();
 }
Example #5
0
 public Vector3 getPosition()
 {
     return(new Vector3(0, 0, -TMsingleton.SecsSinceMidnight(m_Date) * EtcMgr.secondDepthZ));
 }