1
This commit is contained in:
@@ -33,7 +33,7 @@ namespace BITKit.Entities
|
||||
[Header(Constant.Header.Services)]
|
||||
[SerializeReference,SubclassSelector] protected IMeleeService meleeService;
|
||||
|
||||
public Core.Entites.IEntity Entity { get; set; }
|
||||
public Entities.IEntity Entity { get; set; }
|
||||
public Entity UnityEntity=>Entity as Entity;
|
||||
public IBasicItem Item { get; set; }
|
||||
|
||||
@@ -57,8 +57,11 @@ namespace BITKit.Entities
|
||||
if (vfxPlayer)
|
||||
vfxPlayer.enabled = true;
|
||||
|
||||
var animName = animator.animator.GetCurrentAnimatorStateInfo(0).shortNameHash;
|
||||
animator.animator.Play(animName, -1, 0);
|
||||
if (animator)
|
||||
{
|
||||
var animName = animator.animator.GetCurrentAnimatorStateInfo(0).shortNameHash;
|
||||
animator.animator.Play(animName, -1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual UniTask EntryAsync()
|
||||
@@ -126,7 +129,8 @@ namespace BITKit.Entities
|
||||
Position = Transform.position,
|
||||
Force = meleeForce * equip.MeleeForce,
|
||||
Range = equip.MeleeRange,
|
||||
Damage = equip.MeleeDamage
|
||||
Damage = equip.MeleeDamage,
|
||||
Forward = UnityEntity.transform.forward
|
||||
});
|
||||
break;
|
||||
case "HeavyAttack":
|
||||
@@ -137,6 +141,7 @@ namespace BITKit.Entities
|
||||
Force = meleeForce * equip.HeavyMeleeForce,
|
||||
Range = equip.HeavyMeleeRange,
|
||||
Damage = equip.HeavyMeleeDamage,
|
||||
Forward = UnityEntity.transform.forward
|
||||
});
|
||||
break;
|
||||
}
|
||||
@@ -144,7 +149,7 @@ namespace BITKit.Entities
|
||||
}
|
||||
[CustomType(typeof(IEquipService))]
|
||||
[CustomType(typeof(IEntityEquipment))]
|
||||
public class EntityEquipment : EntityComponent,IEquipService,IEntityEquipment
|
||||
public class EntityEquipment : EntityBehavior,IEquipService,IEntityEquipment
|
||||
{
|
||||
public IOptional<float> Zoom { get; } = new Optional<float>(){Value = 1};
|
||||
|
||||
@@ -185,7 +190,7 @@ namespace BITKit.Entities
|
||||
|
||||
foreach (var x in equips.list)
|
||||
{
|
||||
x.Entity = entity;
|
||||
x.Entity = UnityEntity;
|
||||
x.OnAwake();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user