public override void OnEnable() { base.OnEnable(); if (!Positional.IsAtPosition(Config.Owner.transform, _stealConfig.ToStealFrom.transform.position, 3.0f)) { Config.Owner.PushState(new MoveToState.MoveToConfig(_stealConfig.ToStealFrom.transform.position, Config.Owner, 3.0f)); } }
protected override bool IsValid() { if (_path == null || !_config.IsPathStillValid()) { return(false); } return(Time.time - _stateEnterTime < _maxStateDuration && !Positional.IsAtPosition(Config.Owner.transform, _config.Target, 2.0f)); }
public override void OnEnable() { base.OnEnable(); if (!Positional.IsAtPosition(Config.Owner.transform, ToMine.transform.position)) { Config.Owner.PushState(new PathToState.PathToConfig(Config.Owner, ToMine.transform.position)); return; } }
public override bool Update() { if (!base.Update()) { return(false); } if (Positional.IsAtPosition(Config.Owner.transform, _stealConfig.ToStealFrom.transform.position, 3.0f)) { Config.Owner.CharacterYoke.Interact = true; } return(true); }
protected override bool IsValid() { return(!Positional.IsAtPosition(Config.Owner.transform, _config.Target, _config.Tolerance)); }