Initial Commit
This commit is contained in:
commit
ee5c2f922d
2255 changed files with 547750 additions and 0 deletions
40
Assets/Scripts/Data/CollisionSoundDataComponent.cs
Normal file
40
Assets/Scripts/Data/CollisionSoundDataComponent.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Unity.Entities;
|
||||
using UnityEngine;
|
||||
|
||||
namespace DefaultNamespace
|
||||
{
|
||||
[Serializable]
|
||||
public struct CollisionSoundData : ISharedComponentData, IEquatable<CollisionSoundData>
|
||||
{
|
||||
public SoundLibrary Sound;
|
||||
public Vector2 ForceRange;
|
||||
|
||||
public bool Equals(CollisionSoundData other)
|
||||
{
|
||||
return Equals(Sound, other.Sound) && ForceRange.Equals(other.ForceRange);
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
return obj is CollisionSoundData other && Equals(other);
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return ((Sound != null ? Sound.GetHashCode() : 0) * 397) ^ ForceRange.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public struct CollisionSoundTimer : IComponentData
|
||||
{
|
||||
public float Time;
|
||||
}
|
||||
|
||||
public class CollisionSoundDataComponent : SharedComponentDataProxy<CollisionSoundData>
|
||||
{
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue