public WaitTimerTask(BehaviorTree tree, Task parentTask, uint id, WaitTimerTaskDesc description) : base(tree, parentTask, id, description, new WaitTimerTaskProps()) { this.description = description; props = (WaitTimerTaskProps)Props; timeVariable = new Variable(description.Time); }
protected override void OnRestoreProps(ITaskProps props) { base.OnRestoreProps(props); this.props = (WaitTimerTaskProps)props; if (this.props.TimerId > 0) { timer = FindTimer(this.props.TimerId); } else { timer = null; } }