/// <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); } }
// Use this for initialization void Start() { //currentHealth = maxHealth; moveCon = GetComponent <ShipMovementController>(); weapCon = GetComponent <ShipWeaponController>(); //UpdateHealthBar(); }
// Use this for initialization void Start() { moveCon = GetComponent <ShipMovementDavin>(); weapCon = GetComponent <ShipWeaponController>(); repairCon = GetComponent <ShipRepairController>(); }