/// <summary> /// 弾を初期化する基本メソッド /// </summary> /// <param name="attackerType">弾を発射したキャラの所属</param> /// <param name="position">発射時の発射キャラの位置</param> /// <param name="velocity">弾の移動ベクトル</param> /// <param name="data">弾の基本情報</param> /// <param name="target">弾のターゲット</param> /// <param name="offset">弾の初期位置からの相対距離</param> virtual public void Initialize(AttackerType attackerType, Vector3 position, Vector3 velocity, BulletData data, GameObject target, Vector3 offset) { gameObject.SetActive(true); AttackerType = attackerType; transform.position = position + offset; Velocity = velocity * data.Speed; InitializeTime = Time.time; Data = data; Target = target; }
public override void Initialize(AttackerType attackerType, Vector3 position, Vector3 velocity, BulletData data, GameObject target, Vector3 offset) { base.Initialize(attackerType, position, velocity, data, target, offset); FirstContact = false; IsEnable = false; }
public override void Initialize(AttackerType attackerType, Vector3 position, Vector3 velocity, BulletData data, GameObject target, Vector3 offset) { Iterator.SetUnityAction(attackerType, data.SplitData, target, target); Acceleration = 2 * (data.DeploymentDistance - data.Speed * data.DeploymentTime) / data.DeploymentTime / data.DeploymentTime * velocity; base.Initialize(attackerType, position, velocity, data, target, offset); }