Example #1
0
 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);
 }
Example #2
0
        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;
            }
        }