mirror of
https://github.com/GTA-ASM/SanAndreasUnity
synced 2024-11-23 04:23:04 +00:00
cache petrolcap transform
This commit is contained in:
parent
ec43361325
commit
d6c79434a4
1 changed files with 5 additions and 0 deletions
|
@ -273,6 +273,7 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
private FrameContainer _frames;
|
||||
|
||||
public Transform EngineTransform { get; private set; }
|
||||
public Transform PetrolcapTransform { get; private set; }
|
||||
|
||||
private static GameObject s_highDetailMeshesContainer;
|
||||
|
||||
|
@ -388,6 +389,10 @@ namespace SanAndreasUnity.Behaviours.Vehicles
|
|||
if (engineFrame != null)
|
||||
this.EngineTransform = engineFrame.transform;
|
||||
|
||||
var petrolcapFrame = _frames.FirstOrDefault(x => x.Name == "petrolcap");
|
||||
if (petrolcapFrame != null)
|
||||
this.PetrolcapTransform = petrolcapFrame.transform;
|
||||
|
||||
foreach (var frame in _frames)
|
||||
{
|
||||
if (!frame.Name.StartsWith("wheel_")) continue;
|
||||
|
|
Loading…
Reference in a new issue