6XQ2S7MOI246AHRKTVDUFBPGM4UCYOFAMGSACBPBC3OAER5W6DNQC
fileFormatVersion: 2
guid: dedd634c421d0d447aae0e4bad8a07ca
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: a71c8bfea6cb10449a2b695c335b3c8c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
using System;
using System.Collections.Generic;
using CareBoo.Serially;
using TagFighter.Resources;
using UnityEngine;
namespace TagFighter.Effects
{
[CreateAssetMenu(fileName = "NewEffectColors", menuName = "Game/Misc/EffectColors")]
public class EffectColors : ScriptableObject
{
[SerializeField] List<ColorMapping<Resource<IUnitType>, IUnitType>> _colorMapping;
public Color this[Type resource] {
get {
var mappedcolor = _colorMapping.Find(m => m.Resource.Type == resource);
if (mappedcolor != null) {
return mappedcolor.GetColor();
}
throw new IndexOutOfRangeException($"has no mapping for ${resource.GetType()}");
}
}
public bool ContainsKey(Type resource) {
return _colorMapping.Find(m => m.Resource.Type == resource) != null;
}
}
[Serializable]
public class ColorMapping<TResource, TUnit>
where TResource : Resource<TUnit>
where TUnit : IUnitType
{
[TypeFilter(derivedFrom: typeof(IWatchableResource))]
public SerializableType Resource;
[SerializeField]
Color _color;
public Color GetColor() { return _color; }
}
}
fileFormatVersion: 2
guid: 9a4847df660f27548bec02ac3c7d2e36
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c4299eb7af6691f4a82ce6a25fd96981, type: 3}
m_Name: Rune
m_EditorClassIdentifier:
RuneSprite: {fileID: 0}
Rune:
DisplayName:
Speed: 0
ManaCost: 0
Effects:
- Mode:
rid: 786323896988073984
Effect:
rid: 786323896988073985
references:
version: 2
RefIds:
- rid: -2
type: {class: , ns: , asm: }
- rid: 786323896988073984
type: {class: ImmediateEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
data:
_areaOfEffect:
rid: -2
- rid: 786323896988073985
type: {class: UnaryResourceEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
data:
From:
Resource:
rid: 786323896988073986
Location:
rid: 786323896988073987
Multiplier: 1
Addend: 0
To:
Resource:
rid: -2
Location:
rid: -2
Multiplier: 1
Addend: 0
- rid: 786323896988073986
type: {class: Pain, ns: TagFighter.Effects.ResourceTypeAccessors, asm: Assembly-CSharp}
- rid: 786323896988073987
type: {class: Context, ns: TagFighter.Effects.ResourceLocationAccessors.Get,
asm: Assembly-CSharp}
data:
Register:
rid: -2
fileFormatVersion: 2
guid: 9a3a6cebec0d9f94e982f833295e7fde
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c4299eb7af6691f4a82ce6a25fd96981, type: 3}
m_Name: Rune 1
m_EditorClassIdentifier:
RuneSprite: {fileID: 0}
Rune:
DisplayName:
Speed: 0
ManaCost: 0
Effects:
- Mode:
rid: -2
Effect:
rid: 786323897757204480
references:
version: 2
RefIds:
- rid: -2
type: {class: , ns: , asm: }
- rid: 786323897757204480
type: {class: UnaryResourceEffect, ns: TagFighter.Effects, asm: Assembly-CSharp}
data:
From:
Resource:
rid: -2
Location:
rid: 786323897757204481
Multiplier: 1
Addend: 0
To:
Resource:
rid: -2
Location:
rid: -2
Multiplier: 1
Addend: 0
- rid: 786323897757204481
type: {class: Context, ns: TagFighter.Effects.ResourceLocationAccessors.Get,
asm: Assembly-CSharp}
data:
Register:
rid: -2
fileFormatVersion: 2
guid: 5243cedf28ddbe048b1085bdc7872289
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 6c8f41856c918d449a668658a4279b3d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a71c8bfea6cb10449a2b695c335b3c8c, type: 3}
m_Name: NewEffectColors
m_EditorClassIdentifier:
_colorMapping:
- Resource:
typeId: aecc1739-a0df-4013-b430-22d2eb13f0ff
_color: {r: 0.33579564, g: 0.468549, b: 0.9245283, a: 0}
- Resource:
typeId: 7f412c19-18fe-476f-92e4-469ffad0c5d4
_color: {r: 0.94509804, g: 0.1286416, b: 0.10196078, a: 0}
- Resource:
typeId: da13f1c1-4359-4eb9-b969-7db50afe6423
_color: {r: 0.31539613, g: 0.94509804, b: 0.10196078, a: 0}