Second commit
This commit is contained in:
commit
36840f3ad4
999 files changed
+61364
No files matched your search
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using Code.Infrastructure.Generators;
|
||||
using UnityEngine;
|
||||
using UnityEngine.AddressableAssets;
|
||||
|
||||
namespace Code.Infrastructure.Particles
|
||||
{
|
||||
[CreateAssetMenu(fileName = "ParticleInfo", menuName = "Configs/Particles/ParticleInfo")]
|
||||
[Config("Configs/Particles/ParticleInfo", true)]
|
||||
public class ParticleInfo : ScriptableObject
|
||||
{
|
||||
public AssetReference particleSystem;
|
||||
public int particleId;
|
||||
public ParticlePartition particlePartition;
|
||||
public int CountInPool;
|
||||
public ParticlePartitionIDPair PartitionIDPair;
|
||||
}
|
||||
|
||||
[Serializable]
|
||||
public struct ParticlePartitionIDPair : IEquatable<ParticlePartitionIDPair>
|
||||
{
|
||||
public ParticlePartition ParticlePartition;
|
||||
public int ID;
|
||||
|
||||
public ParticlePartitionIDPair(ParticlePartition particlePartition, int id)
|
||||
{
|
||||
ParticlePartition = particlePartition;
|
||||
ID = id;
|
||||
}
|
||||
|
||||
public bool Equals(ParticlePartitionIDPair other)
|
||||
{
|
||||
return ParticlePartition == other.ParticlePartition && ID == other.ID;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is ParticlePartitionIDPair other && Equals(other);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return HashCode.Combine((int)ParticlePartition, ID);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user