Added the ability to associate simple commodities with resource maps Added resource placement to zone generator Added crafting blueprints and stat addressing system Refactored Thrusters and Shields into Behaviors Fixed server losing database connection Updated icons
45 lines
No EOL
1.2 KiB
C#
45 lines
No EOL
1.2 KiB
C#
using System;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using JsonKnownTypes;
|
|
using MessagePack;
|
|
using Newtonsoft.Json;
|
|
using Unity.Mathematics;
|
|
using static Unity.Mathematics.math;
|
|
using static Unity.Mathematics.noise;
|
|
|
|
public interface IItemBehavior
|
|
{
|
|
void Initialize();
|
|
void Update(float delta);
|
|
void FixedUpdate(float delta);
|
|
Ship Ship { get; }
|
|
Gear Item { get; }
|
|
GameContext Context { get; }
|
|
IItemBehaviorData Data { get; }
|
|
}
|
|
|
|
public interface IActivatedItemBehavior : IItemBehavior
|
|
{
|
|
void Activate();
|
|
void Deactivate();
|
|
}
|
|
|
|
public interface IAnalogItemBehavior : IItemBehavior
|
|
{
|
|
void SetAxis(float value);
|
|
}
|
|
|
|
[InspectableField,
|
|
Union(0, typeof(CannonBehaviorData)),
|
|
Union(1, typeof(LauncherBehaviorData)),
|
|
Union(2, typeof(ReactorBehaviorData)),
|
|
Union(4, typeof(AfterburnerBehaviorData)),
|
|
Union(5, typeof(SensorBehaviorData)),
|
|
JsonConverter(typeof(JsonKnownTypesConverter<IItemBehaviorData>)), JsonObject(MemberSerialization.OptIn)]
|
|
// [Union(3, typeof(PlusUltraBehaviorData))]
|
|
public interface IItemBehaviorData
|
|
{
|
|
IItemBehavior CreateInstance(GameContext context, Ship ship, Gear item);
|
|
} |