Demo Hotfixes
Replaced Unity TAA with PlayDead TAA Custom keyboard layout test scene Adjusted Aetheric Drive VFX to be more subtle Reworked stardust VFX to reduce flickering artifacts Added Action Bar & weapon groups saving/loading Implemented security levels and faction safe zone visualization Improved station placement (now include defensive turrets)
This commit is contained in:
parent
eb64cbf94a
commit
2c4520000b
128 changed files with 12821 additions and 561 deletions
|
|
@ -20,8 +20,6 @@ public class ActionBarSlot : MonoBehaviour
|
|||
public ObservablePointerExitTrigger PointerExitTrigger;
|
||||
private ActionBarBinding binding;
|
||||
|
||||
public Entity Entity { get; set; }
|
||||
|
||||
public ActionBarBinding Binding
|
||||
{
|
||||
get => binding;
|
||||
|
|
@ -53,7 +51,7 @@ public class ActionBarSlot : MonoBehaviour
|
|||
},
|
||||
ActionBarGearBinding actionBarGearBinding => new SavedActionBarGearBinding
|
||||
{
|
||||
EquipmentIndex = Entity.Equipment.IndexOf(actionBarGearBinding.Item),
|
||||
EquipmentIndex = actionBarGearBinding.Entity.Equipment.IndexOf(actionBarGearBinding.Item),
|
||||
BehaviorIndex = Array.IndexOf(actionBarGearBinding.Item.Behaviors, actionBarGearBinding.Behavior)
|
||||
},
|
||||
ActionBarWeaponGroupBinding actionBarWeaponGroupBinding => new SavedActionBarWeaponGroupBinding
|
||||
|
|
@ -64,24 +62,24 @@ public class ActionBarSlot : MonoBehaviour
|
|||
};
|
||||
}
|
||||
|
||||
public void Restore(SavedActionBarBinding binding)
|
||||
public void Restore(SavedActionBarBinding binding, Entity entity)
|
||||
{
|
||||
Binding = binding switch
|
||||
{
|
||||
SavedActionBarConsumableBinding savedActionBarConsumableBinding =>
|
||||
new ActionBarConsumableBinding(
|
||||
Entity,
|
||||
entity,
|
||||
this,
|
||||
savedActionBarConsumableBinding.Target.Value),
|
||||
SavedActionBarGearBinding savedActionBarGearBinding =>
|
||||
new ActionBarGearBinding(
|
||||
Entity,
|
||||
entity,
|
||||
this,
|
||||
Entity.Equipment[savedActionBarGearBinding.EquipmentIndex],
|
||||
Entity.Equipment[savedActionBarGearBinding.EquipmentIndex]
|
||||
entity.Equipment[savedActionBarGearBinding.EquipmentIndex],
|
||||
entity.Equipment[savedActionBarGearBinding.EquipmentIndex]
|
||||
.Behaviors[savedActionBarGearBinding.BehaviorIndex] as IActivatedBehavior),
|
||||
SavedActionBarWeaponGroupBinding savedActionBarWeaponGroupBinding =>
|
||||
new ActionBarWeaponGroupBinding(Entity, this, savedActionBarWeaponGroupBinding.Group),
|
||||
new ActionBarWeaponGroupBinding(entity, this, savedActionBarWeaponGroupBinding.Group),
|
||||
_ => null
|
||||
};
|
||||
}
|
||||
|
|
@ -89,7 +87,7 @@ public class ActionBarSlot : MonoBehaviour
|
|||
|
||||
public abstract class ActionBarBinding
|
||||
{
|
||||
protected Entity Entity { get; }
|
||||
public Entity Entity { get; }
|
||||
protected ActionBarSlot Slot { get; }
|
||||
public abstract void Activate();
|
||||
public abstract void Deactivate();
|
||||
|
|
@ -192,7 +190,7 @@ public class ActionBarWeaponGroupBinding : ActionBarBinding
|
|||
|
||||
public override void Activate()
|
||||
{
|
||||
foreach (var weapon in Entity.TriggerGroups[Group].weapons)
|
||||
foreach (var weapon in Entity.WeaponGroups[Group].weapons)
|
||||
{
|
||||
weapon.Activate();
|
||||
}
|
||||
|
|
@ -200,7 +198,7 @@ public class ActionBarWeaponGroupBinding : ActionBarBinding
|
|||
|
||||
public override void Deactivate()
|
||||
{
|
||||
foreach (var weapon in Entity.TriggerGroups[Group].weapons)
|
||||
foreach (var weapon in Entity.WeaponGroups[Group].weapons)
|
||||
{
|
||||
weapon.Deactivate();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -477,14 +477,6 @@ public class ActionGameManager : MonoBehaviour
|
|||
num.InputLabel.text = i.ToString();
|
||||
}
|
||||
|
||||
if(PlayerSettings.SavedRun!=null)
|
||||
{
|
||||
for (var i = 0; i < _actionBarSlots.Count; i++)
|
||||
{
|
||||
_actionBarSlots[i].Restore(PlayerSettings.SavedRun.ActionBarBindings[i]);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
|
@ -801,6 +793,11 @@ public class ActionGameManager : MonoBehaviour
|
|||
//StartCoroutine(IntroCutscene(targetEntity as Ship));
|
||||
BindToEntity(targetEntity);
|
||||
}
|
||||
|
||||
for (var i = 0; i < _actionBarSlots.Count; i++)
|
||||
{
|
||||
_actionBarSlots[i].Restore(PlayerSettings.SavedRun.ActionBarBindings[i], CurrentEntity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ using Random = UnityEngine.Random;
|
|||
|
||||
public class EntityInstance : MonoBehaviour
|
||||
{
|
||||
public Transform InfluencePrefab;
|
||||
public Transform PingPrefab;
|
||||
public Material InvisibleMaterial;
|
||||
public static Transform EffectManagerParent;
|
||||
|
|
@ -42,6 +43,7 @@ public class EntityInstance : MonoBehaviour
|
|||
private (Transform transform, MeshRenderer meshRenderer) _currentPing;
|
||||
private float _pingBrightness;
|
||||
private Sensor _sensor;
|
||||
private Transform _influenceInstance;
|
||||
|
||||
private List<(GameObject source, EquippedItem item)> _audioSources = new List<(GameObject source, EquippedItem item)>();
|
||||
// private (Reactor reactor, GameObject sfxSource) _reactor;
|
||||
|
|
@ -444,15 +446,12 @@ public class EntityInstance : MonoBehaviour
|
|||
}
|
||||
}));
|
||||
|
||||
// _subscriptions.Add(entity.Docked.Take(1).Subscribe(parent =>
|
||||
// {
|
||||
// if (Visible)
|
||||
// {
|
||||
// FadeOut(sectorRenderer.EntityFadeTime);
|
||||
// OnFadedOut += () => entity.Zone.Entities.Remove(entity);
|
||||
// }
|
||||
// else entity.Zone.Entities.Remove(entity);
|
||||
// }));
|
||||
// TODO: ActionGameManager.CurrentSector.FactionRelationships[orbital.Faction]
|
||||
if (entity is OrbitalEntity orbital && orbital.SecurityRadius > 1)// && (int) orbital.SecurityLevel > (int) SecurityLevel.Secure)
|
||||
{
|
||||
_influenceInstance = Instantiate(InfluencePrefab);
|
||||
_influenceInstance.transform.localScale = Vector3.one * orbital.SecurityRadius;
|
||||
}
|
||||
}
|
||||
|
||||
public Transform GetBarrel(HardpointData hardpoint)
|
||||
|
|
@ -473,7 +472,6 @@ public class EntityInstance : MonoBehaviour
|
|||
{
|
||||
AkSoundEngine.SetObjectPosition(source, source.transform);
|
||||
}
|
||||
LocalSpace.localPosition = transform.localPosition;
|
||||
if (_currentPing.transform)
|
||||
{
|
||||
_currentPing.transform.localScale = _sensor.PingRadius * Vector3.one;
|
||||
|
|
@ -518,7 +516,7 @@ public class EntityInstance : MonoBehaviour
|
|||
|
||||
foreach (var x in RadiatorMeshes)
|
||||
{
|
||||
x.Value.material.SetFloat("_Emission", Entity.ItemManager.GameplaySettings.TemperatureEmissionCurve.Evaluate(x.Key.Temperature));
|
||||
x.Value.material.SetFloat("_Emission", Entity.ItemManager.GameplaySettings.TemperatureEmissionCurve.Evaluate(x.Key.RadiatorTemperature));
|
||||
}
|
||||
|
||||
foreach (var x in Barrels)
|
||||
|
|
@ -528,11 +526,14 @@ public class EntityInstance : MonoBehaviour
|
|||
|
||||
LookAtPoint.position = transform.position + (Vector3) Entity.LookDirection *
|
||||
(Entity.Target.Value != null ? max(Entity.TargetRange,Entity.ItemManager.GameplaySettings.ConvergenceMinimumDistance) : 10000);
|
||||
transform.position = Entity.Position;
|
||||
LocalSpace.localPosition = transform.position = Entity.Position;
|
||||
if (_influenceInstance)
|
||||
_influenceInstance.position = new Vector3(Entity.Position.x, 0, Entity.Position.z);
|
||||
}
|
||||
|
||||
public virtual void OnDestroy()
|
||||
{
|
||||
if (_influenceInstance) Destroy(_influenceInstance.gameObject);
|
||||
Destroy(LocalSpace.gameObject);
|
||||
foreach (var (source, item) in _audioSources)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -119,10 +119,8 @@ public class ShipInstance : EntityInstance
|
|||
{
|
||||
var thrust = length(_aetherDrive.Drive.ThrustDirection);
|
||||
var forceOverLifetime = _aetherDrive.Particles.forceOverLifetime;
|
||||
var curve = forceOverLifetime.z;
|
||||
curve.curveMultiplier = thrust * _aetherDrive.BaseForce;
|
||||
if(thrust > .01f)
|
||||
_aetherDrive.Particles.transform.forward = new Vector3(_aetherDrive.Drive.ThrustDirection.x, 0, _aetherDrive.Drive.ThrustDirection.y);
|
||||
forceOverLifetime.xMultiplier = _aetherDrive.Drive.ThrustDirection.x * _aetherDrive.BaseForce;
|
||||
forceOverLifetime.zMultiplier = _aetherDrive.Drive.ThrustDirection.y * _aetherDrive.BaseForce;
|
||||
var emissionModule = _aetherDrive.Particles.emission;
|
||||
emissionModule.rateOverTimeMultiplier = _aetherDrive.BaseEmission * thrust;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue