Move AetherDrive visuals behind runtime owner
This commit is contained in:
parent
444acc9f30
commit
d6e478cd5b
4 changed files with 8 additions and 4 deletions
|
|
@ -50,7 +50,7 @@ public class ShipInstance : EntityInstance
|
|||
var drive = ship.GetBehavior<AetherDrive>();
|
||||
if (drive != null)
|
||||
{
|
||||
var particles = Instantiate(UnityHelpers.LoadAsset<ParticleSystem>(drive.DriveData.Particles), transform, false);
|
||||
var particles = Instantiate(UnityHelpers.LoadAsset<ParticleSystem>(drive.Particles), transform, false);
|
||||
var main = particles.main;
|
||||
main.customSimulationSpace = LocalSpace;
|
||||
_aetherDrive = new AetherDriveInstance
|
||||
|
|
|
|||
|
|
@ -67,8 +67,7 @@ public class AetherDrive : Behavior
|
|||
public float3 Rpm { get; private set; }
|
||||
public float MaximumRpm { get; private set; }
|
||||
public float2 ThrustDirection { get; private set; }
|
||||
|
||||
public AetherDriveData DriveData => _data;
|
||||
public string Particles { get; }
|
||||
|
||||
public float3 Axis
|
||||
{
|
||||
|
|
@ -79,11 +78,13 @@ public class AetherDrive : Behavior
|
|||
public AetherDrive(AetherDriveData data, EquippedItem item) : base(data, item)
|
||||
{
|
||||
_data = data;
|
||||
Particles = data.Particles;
|
||||
}
|
||||
|
||||
public AetherDrive(AetherDriveData data, ConsumableItemEffect item) : base(data, item)
|
||||
{
|
||||
_data = data;
|
||||
Particles = data.Particles;
|
||||
}
|
||||
|
||||
public override bool Execute(float dt)
|
||||
|
|
@ -141,4 +142,4 @@ public class AetherDrive : Behavior
|
|||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue