private void Awake() { ac = GetComponent <ActorController>(); GameObject model = ac.model; GameObject sensor = transform.Find("sensor").gameObject; bm = Bind <BattleManger>(sensor); wm = Bind <WeaponManager>(model); sm = Bind <StateManager>(gameObject); }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }