OSDN Git Service

staticプロパティをインスタンスプロパティに変更
[kcd/KCD.git] / KCD / DamageValueTransformer.swift
index 9f6813f..c368938 100644 (file)
@@ -30,20 +30,23 @@ final class DamageValueTransformer: ValueTransformer {
     private func attribute(for type: DamageType) -> (string: String, attr: [NSAttributedStringKey: Any])? {
         
         switch type {
-        case .none:
-            return nil
+            
+        case .none: return nil
             
         case .slightly:
+            
             return ("●",
                     [.foregroundColor: #colorLiteral(red: 1, green: 0.925, blue: 0, alpha: 1), .paragraphStyle: paragraphStyle]
             )
             
         case .modest:
+            
             return ("●",
                     [.foregroundColor: #colorLiteral(red: 1, green: 0.32, blue: 0, alpha: 1), .paragraphStyle: paragraphStyle]
             )
             
         case .badly:
+            
             return ("◼︎",
                     [.foregroundColor: #colorLiteral(red: 0.87, green: 0, blue: 0.036, alpha: 1), .paragraphStyle: paragraphStyle]
             )