using System.Threading.Tasks;
using FinTOKMAK.TimelineSystem.Runtime;
using UnityEngine;
namespace FinTOKMAK.WeaponSystem.Runtime
{
///
/// The interface for Weapon class
///
public interface IWeapon where WeaponType : IWeapon
{
#region Property
///
/// The unique id of the weapon.
///
string id { get; }
///
/// The index of weapon in the manager.
///
int index { get; set; }
///
/// The config data of the weapon.
///
IWeaponData configData { get; }
///
/// The runtime data of the weapon.
///
IWeaponData runtimeData { get; }
///
/// The weapon manager carrying the current Weapon.
///
IWeaponManager weaponManager { get; set; }
///
/// The TimelineSystem with the WeaponManager.
///
TimelineSystem.Runtime.TimelineSystem timelineSystem { get; set; }
///
/// The TimelineEventManager used by the Timeline System.
///
TimelineEventManager timelineEventManager { get; set; }
#endregion
#region Weapon Logic Callback
///
/// The method called when the weapon is initialized for the first time.
///
void OnInitialize();
///
/// The method is called each Unity Update when the weapon is put out and able to use.
///
void OnUpdate();
#endregion
///
/// Mount the weapon instance to a certain mount point.
///
/// The weapon instance GameObject.
/// The name of the mount point.
void Mount(GameObject instance, string mountPoint);
///
/// The callback function called when the weapon is put out.
/// This method should put out the weapon immediately.
///
void OnPutOut();
///
/// The callback function called when the weapon finish put out.
/// This method should enable the weapon fire status and restore some data.
///
void OnFinishPutOut();
///
/// The async method to put out weapon.
/// Called when the weapon is put out.
/// Finish the async when the put out process complete (finish put out animation).
///
/// Async Task
Task OnPutOutAsync();
///
/// The callback method called when the weapon is put in.
/// This method should disable some weapon function such as reload and fire.
///
void OnPutIn();
///
/// The callback method called when the weapon finish put in.
/// This method should store some weapon state.
///
void OnFinishPutIn();
///
/// The async method to put in weapon.
/// Called when the weapon is put in.
/// Finish the async when the put in process complete (finish put in animation).
///
/// Async Task
Task OnPutInAsync();
///
/// Callback function called when the weapon trigger is pull down.
///
void OnTriggerDown();
///
/// Callback function called when the weapon trigger is up.
///
void OnTriggerUp();
///
/// Callback function called when the WeaponManager's _able2Shoot changed.
///
/// the new _able2Shoot value.
void OnShootEnableChanged(bool enable);
///
/// Callback function called when the weapon reload key is pressed down.
///
void OnReloadDown();
///
/// Callback function called when the weapon reload key is up.
///
void OnReloadUp();
///
/// Callback function called when the WeaponManager's _able2Reload changed.
///
/// the new _able2Reload value.
void OnReloadEnableChanged(bool enable);
///
/// The callback function called when the player start aiming.
///
void OnAimDown();
///
/// The callback function called when the player stop aiming.
///
void OnAimUp();
///
/// The callback function called when the WeaponManager's _able2Aim changed.
///
/// the new _able2Aim value.
void OnAimEnableChanged(bool enable);
}
}