public void Init(Transform trans, TankMovement move, TurretController turret, FireController fire) { mTrans = trans; mMoveScript = move; mTurretScript = turret; mFireScript = fire; // 1発目の弾を発射するまでの待機時間を決めておく RandomSetWaitFireTime(); }
void Start() { mMovementScript = GetComponent <TankMovement>(); mTurretScript = GetComponent <TurretController>(); mFireScript = GetComponent <FireController>(); mHealthScript = GetComponent <TankHealth>(); // 敵戦車はAIコンポーネントを取得し、初期化する if (!mIsPlayer) { mAi = GetComponent <EnemyAi>(); mAi.Init(GetComponent <Transform>(), mMovementScript, mTurretScript, mFireScript); } }
public void SetDelegate(FireController fireController) { dOnSleep = fireController.OnSleepBullet; //dOnSleep = new OnSleep(fireController.OnSleepBullet); }