Exemplo n.º 1
0
        internal AutoDoorCloserTE CreateParallelTimer(int timeoutDelay, Dictionary <string, object> args)
        {
            AutoDoorCloserTE timedEvent = new AutoDoorCloserTE(timeoutDelay);

            timedEvent.Args    = args;
            timedEvent.OnFire += Callback;
            return(timedEvent);
        }
Exemplo n.º 2
0
        internal void Callback(AutoDoorCloserTE e)
        {
            e.Kill();
            var data = e.Args;
            var door = (BasicDoor)data["Door"];
            var loc  = (Vector3)data["Loc"];

            if (door.state.ToString() != "Closing" && door.state.ToString() != "Closed")
            {
                door.ToggleStateServer(loc, NetCull.timeInMillis, null);
            }

            //togglestateserver.Invoke(door, new object[] { loc, NetCull.timeInMillis, null });;
        }