public TimerT <TState> AddTimer <TState>(TimerT <TState> timer) { if (_timers == null) { _timers = new List <ITimerT>(); } _timers.Add(timer); return(timer); }
public void startLaunch() { p = Instantiate (fm.p, transform.position, transform.rotation) as GameObject; p.transform.parent = this.transform; p.GetComponent<Rigidbody> ().velocity = Vector3.up * launchSpeed; p.GetComponent<Rigidbody> ().useGravity = true; setV (fireType, rotation); t = gameObject.AddComponent<TimerT>(); state = 1; }
void EventQueryCellResult(IInstance sender, VpObject objectData) { if (Interpreter.Interpret(objectData).SelectMany(trigger => trigger.Commands).OfType <ACName>().Any(command => command.Name == _config.Config.Name)) { _billBoard = objectData; SetSign(_config.Config.TextItems[0]); _timer = AddTimer(new TimerT <TextRotatorBot>(RotationCallback, this, _config.Config.TextItems[0].Delay, 0)); _timer.Start(); } }