private void Build() { _rayCastMover = Substitute.For <IRayCastMover>(); _rayCastInteractor = Substitute.For <IRayCastInteractor>(); _rayCastInteractor.Target.Returns(_target); _rayCastInteractor.HasTarget().Returns(_target != null); _mouseAction = new GameObject().AddComponent <MouseAction>(); _mouseAction.Init(_rayCastMover, _rayCastInteractor); }
private void Start() { _mover = GetComponent <RayCastMover>(); _rayCaster = GetComponent <RayCastInteractor>(); }
public void Init(IRayCastMover mover, IRayCastInteractor interactor) { _mover = mover; _rayCaster = interactor; }
public void Deconstruct(out MouseAction action, out IRayCastMover rayCastMover, out IRayCastInteractor interactor) { Build(); action = _mouseAction; rayCastMover = _rayCastMover; interactor = _rayCastInteractor; }