private void Update() { if (Input.GetMouseButtonDown(0)) { var ray = Camera.main.ScreenPointToRay(Input.mousePosition); RaycastHit hit; if (Physics.Raycast(ray, out hit)) { if (!Locator <IEffectManager> .IsValid()) { Locator <IEffectManager> .Bind(new DummyEffectManager()); } Locator <IEffectManager> .I.PlayEffect(hit.point); } } }
static AssemblySetup() { Locator.Bind <ICompilationInfoFactory, CustomCompilationInfoFactory>(new CustomCompilationInfoFactory()); }
private void Awake() { Locator <LineManager> .Bind(this); }
private void OnEnable() { Locator <IEffectManager> .Bind(this); }
// コンポーネントのオンオフで替えられるように実装 private void OnEnable() { Locator <IInputManager> .Bind(this); }