2020-12-27 22:18:22 +00:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
|
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using MessagePack;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
using Unity.Mathematics;
|
|
|
|
|
using static Unity.Mathematics.math;
|
|
|
|
|
|
|
|
|
|
[MessagePackObject, JsonObject(MemberSerialization.OptIn), RuntimeInspectable]
|
|
|
|
|
public class CockpitData : BehaviorData
|
|
|
|
|
{
|
|
|
|
|
public override IBehavior CreateInstance(ItemManager context, Entity entity, EquippedItem item)
|
|
|
|
|
{
|
|
|
|
|
return new Cockpit(context, this, entity, item);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class Cockpit : IBehavior
|
|
|
|
|
{
|
|
|
|
|
private CockpitData _data;
|
|
|
|
|
|
|
|
|
|
public Entity Entity { get; }
|
|
|
|
|
public EquippedItem Item { get; }
|
|
|
|
|
public ItemManager Context { get; }
|
|
|
|
|
|
|
|
|
|
public BehaviorData Data => _data;
|
2020-12-31 19:53:16 +00:00
|
|
|
|
2020-12-27 22:18:22 +00:00
|
|
|
|
|
|
|
|
public Cockpit(ItemManager context, CockpitData data, Entity entity, EquippedItem item)
|
|
|
|
|
{
|
|
|
|
|
Context = context;
|
|
|
|
|
_data = data;
|
|
|
|
|
Entity = entity;
|
|
|
|
|
Item = item;
|
|
|
|
|
}
|
|
|
|
|
|
2021-01-10 03:59:47 +00:00
|
|
|
public bool Execute(float delta)
|
2020-12-27 22:18:22 +00:00
|
|
|
{
|
2021-03-06 02:42:19 +00:00
|
|
|
return true;
|
2020-12-27 22:18:22 +00:00
|
|
|
}
|
|
|
|
|
}
|