/// <summary> /// 機体構造の設定 /// </summary> public void SetStructure(ShipStructure structure) { weapon = structure.WeaponController; if (weapon) { weapon.SetBulletExclusionTag("Player"); } thruster = structure.ThrusterController; attitude = structure.AttitudeController; marker = structure.Marker; if (marker) { detector = marker.ObjDetector; detector.OnDetect.RemoveListener(OnDetect); detector.OnDetect.AddListener(OnDetect); detector.OnRelease.RemoveListener(OnRelease); detector.OnRelease.AddListener(OnRelease); } attackable = structure.Attackable; if (attackable) { attackable.OnAttacked.RemoveListener(OnAttacked); attackable.OnAttacked.AddListener(OnAttacked); attackable.OnDied.RemoveListener(OnDied); attackable.OnDied.AddListener(OnDied); } }
/// <summary> /// 解除された /// </summary> private void OnReleased(ObjectDetector2D detector) { }
/// <summary> /// 検出された /// </summary> private void OnDetected(ObjectDetector2D detector) { }