void Start() { S_Adire = GetComponent <AIDirector>(); // ディレクター取得 S_Amove = GetComponent <AIMove>(); // 移動スクリプト取得 S_Agun = GetComponent <AIGun>(); // 射撃スクリプト取得 S_Alife = GetComponent <AILife>(); // ライフスクリプト取得 RegisterObj(); // 変身するオブジェクトをリストに格納 SetOdata(OdataList[mynum]); }
private void Start() { agent = GetComponent <NavMeshAgent>(); aiGun = transform.GetChild(0).GetChild(0).GetComponent <AIGun>(); agent.updateRotation = false; agent.updatePosition = true; spawnTime = DateTime.Now; AIGlobals.Instance.WaveManager.SpawnAIWave(); }
void Awake() { S_Amove = GetComponent <AIMove>(); S_Aflag = GetComponent <AIFlag>(); S_Agun = GetComponent <AIGun>(); S_Asearch = GetComponent <AIRouteSearch>(); S_Alife = GetComponent <AILife>(); S_Atrans = GetComponent <AITransChange>(); S_Team = GetComponent <TeamScript>(); RegisterEvent_ChangeState(SetNowState); RegisterEvent_ChangeFindEnemyFlag(SetFindEnemyFlag); S_Aflag.RegisterEvent_ChangeHaveFlag(ChangeFlagState); }
// private GameObject hookedPrefab; void Awake() {//must change everything to an array MainGunScript = guns[0].GetComponent <GrappleGun>(); AIgun1Script = guns[1].GetComponent <AIGun>(); AIgun2Script = guns[2].GetComponent <AIGun>(); AIgun3Script = guns[3].GetComponent <AIGun>(); AIgun4Script = guns[4].GetComponent <AIGun>(); AIgun5Script = guns[5].GetComponent <AIGun>(); _isHooked = false; isAIDropping = false; maxTime = UnityEngine.Random.Range(4, 6); if (thisCube == null) { thisCube = transform; } spawnLocation = thisCube.transform.position; Respawn(); }
void SpawnWeapon() { GameObject weap = Instantiate(weapon, handSlot.position, handSlot.rotation, handSlot); gun = weap.GetComponent <AIGun>(); }
// Start is called before the first frame update void Start() { thisParent = transform.parent; gunScript = thisParent.GetComponent <AIGun>(); }
// Start is called before the first frame update void Start() { gunScript = gun.GetComponent <AIGun>(); thisObject = transform; }