Refactor item instance to use DatabaseLink Labels now pop up when aiming at loot Yeeted HUD trigger group UI into the abyss Created rebindable action bar (missing: assigning actions) Created Consumable Items Refactored behaviors to work on consumable items Implemented Velocity Conversion Behavior
31 lines
849 B
C#
31 lines
849 B
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using MessagePack;
|
|
using Newtonsoft.Json;
|
|
using Unity.Mathematics;
|
|
using static Unity.Mathematics.math;
|
|
|
|
[Inspectable, MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
|
public class AutoWeaponData : InstantWeaponData
|
|
{
|
|
public override Behavior CreateInstance(EquippedItem item)
|
|
{
|
|
return new AutoWeapon(this, item);
|
|
}
|
|
}
|
|
|
|
public class AutoWeapon : InstantWeapon
|
|
{
|
|
|
|
public AutoWeapon(InstantWeaponData data, EquippedItem item) : base(data, item) { }
|
|
public AutoWeapon(InstantWeaponData data, ConsumableItemEffect item) : base(data, item) { }
|
|
|
|
public override bool Execute(float dt)
|
|
{
|
|
if(_firing && _burstRemaining == 0 && _cooldown < 0)
|
|
Trigger();
|
|
return base.Execute(dt);
|
|
}
|
|
}
|
|
|