1
This commit is contained in:
19
Src/Unity/Scripts/Impact/Net.BITKit.Impact.Unity.asmdef
Normal file
19
Src/Unity/Scripts/Impact/Net.BITKit.Impact.Unity.asmdef
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "Net.BITKit.Impact.Unity",
|
||||
"rootNamespace": "",
|
||||
"references": [
|
||||
"GUID:14fe60d984bf9f84eac55c6ea033a8f4",
|
||||
"GUID:89bd0da52dc3cc94daadea6252c6ad1b",
|
||||
"GUID:d525ad6bd40672747bde77962f1c401e",
|
||||
"GUID:49b49c76ee64f6b41bf28ef951cb0e50"
|
||||
],
|
||||
"includePlatforms": [],
|
||||
"excludePlatforms": [],
|
||||
"allowUnsafeCode": false,
|
||||
"overrideReferences": false,
|
||||
"precompiledReferences": [],
|
||||
"autoReferenced": true,
|
||||
"defineConstraints": [],
|
||||
"versionDefines": [],
|
||||
"noEngineReferences": false
|
||||
}
|
@@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24866f14213d2124aa20be037476b521
|
||||
AssemblyDefinitionImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
28
Src/Unity/Scripts/Impact/ScriptableImpact.cs
Normal file
28
Src/Unity/Scripts/Impact/ScriptableImpact.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Policy;
|
||||
using AYellowpaper.SerializedCollections;
|
||||
using BITKit;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Net.BITKit.Impact
|
||||
{
|
||||
public class ScriptableImpact : ScriptableObject,ITag
|
||||
{
|
||||
[SerializeReference, SubclassSelector] private IReference[] tags;
|
||||
[SerializeField] private int priority;
|
||||
|
||||
[SerializeField] private Transform[] prefabs;
|
||||
[SerializeField] private AudioClip[] audioClips;
|
||||
|
||||
public int Hash { get; set; }
|
||||
public IReadOnlyCollection<string> Tags => tags.Select(x=>x.Get()).ToArray();
|
||||
|
||||
public Transform Prefab => prefabs.Random();
|
||||
public AudioClip AudioClip => audioClips.Random();
|
||||
public int Priority => priority;
|
||||
}
|
||||
|
||||
}
|
11
Src/Unity/Scripts/Impact/ScriptableImpact.cs.meta
Normal file
11
Src/Unity/Scripts/Impact/ScriptableImpact.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: ac8fd6229773587428b5dca77471e986
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user