private void Start() { _stats = GetComponent <CharacterStats>(); _mover = GetComponent <LookRadiusMover>(); _stats.DieAction += Die; _stats.TakeDamageAction += TakeDamage; }
private void Build() { var source = new GameObject(); _mover = source.AddComponent <LookRadiusMover>(); _motor = Substitute.For <INavMeshAgentMotor>(); source.transform.position = _position; _mover.Init(_motor); _mover.SetInternals(_lookRadius, _stopRange); }
public void Deconstruct(out LookRadiusMover action, out INavMeshAgentMotor motor) { Build(); action = _mover; motor = _motor; }