Esempio n. 1
0
        /// <summary>
        /// Register a timed event to be called every X milliseconds
        /// </summary>
        /// <param name="name">Name of the event handler</param>
        /// <param name="time">Periodic time in milliseconds</param>
        /// <param name="handler">Timed Event Handler</param>
        public void RegisterTimedEvent(string name, int time, TimedEventHandler handler)
        {
            // Create the timed event
            TimedEvent t = new TimedEvent();

            t.mSecs   = time;
            t.handler = handler;
            t.timeout = TimeSpan.FromMilliseconds(Environment.TickCount + time);

            // Add the timed event handler
            m_timedEvents.Add(name, t);
        }
Esempio n. 2
0
    public FlatElementBase()
    {
        SoftInterpolation = 0.08f;
        HardScale         = Vector3.one;
        HardColor         = new Color(0.5f, 0.5f, 0.5f, 0.5f);

        ColorInterpolationMaxLimit = 1f;
        ColorInterpolationMinLimit = 0.04f;

        PositionInterpolationMaxLimit = Mathf.Infinity;
        PositionInterpolationMinLimit = 0;

        Events = new TimedEventHandler();
    }