void Start() { if (cam == null) { Debug.LogError("working"); this.enabled = false; } weaponManager = GetComponent <weaponManager>(); }
private void Start() { if (cam == null) { Debug.LogError("Camera missing"); this.enabled = false; } WeaponManager = GetComponent <weaponManager>(); }
// Start is called before the first frame update void Awake() { ac = GetComponent <ActorController>(); GameObject model = ac.model; //GameObject npcSensor = transform.Find("npcSensor").gameObject; if (camIdentify.GetComponent <cameraController>().isAI == false) { GameObject sensor = transform.Find("sensor").gameObject; bm = Bind <BattleManager>(sensor); } else if (camIdentify.GetComponent <cameraController>().isAI) { GameObject sensor = transform.Find("npcSensor").gameObject; bm = Bind <BattleManager>(sensor); } wm = Bind <weaponManager>(model); sm = Bind <StateManager>(gameObject); }
private void Awake() { manager = this; }
void Awake() { wm = this; }