Exemplo n.º 1
0
        public Parachute Create(ParachuteConfig config, ImmutableTransform spawnpoint, string name = "Parachute")
        {
            Profiler.BeginSample("CreateParachute");

            config.AirfoilDefinition = _airfoilDefinition;

            Profiler.BeginSample("CreateSimObject");
            var parachute = UnityParachuteFactory.Create(config, spawnpoint, name);

            Profiler.EndSample();

            Profiler.BeginSample("CreateSkinnedMesh");
            UnityParachuteMeshFactory.CreateSkinnedMesh(parachute, _parachuteMeshconfig, _parachuteMaterial);
            Profiler.EndSample();

            parachute.Inject(_windManager, _fixedClock, _fixedScheduler);

            Profiler.EndSample();

            return(parachute);
        }
Exemplo n.º 2
0
 private void Awake()
 {
     _airfoilDefinition = Instantiate(_airfoil);
     UnityParachuteMeshFactory.Initialize(_parachuteMeshconfig);
 }