added reload animation and feature
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Darkmatter.Core;
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using VContainer;
|
||||
|
||||
@@ -56,9 +58,12 @@ namespace Darkmatter.Domain
|
||||
{
|
||||
GunWeapon.Attack();
|
||||
}
|
||||
if(GunWeapon.AmmoCount==0)
|
||||
{
|
||||
playerAnim.PlayReloadAnim(GunWeapon);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace Darkmatter.Domain
|
||||
|
||||
public abstract void Attack();
|
||||
|
||||
public virtual int AmmoCount { get; protected set; }
|
||||
|
||||
public virtual void Reload()
|
||||
{
|
||||
Debug.Log("Reloading");
|
||||
|
||||
Reference in New Issue
Block a user