Пример #1
0
 public void OnReturnToPool()
 {
     this.Emitter        = null;
     this.MeshTracker    = null;
     this.EmitterTracker = null;
     this.DefaultTracker = null;
     this.trailToClear   = null;
     this.Bullet         = null;
     if (this.DefaultTrackerObject != null)
     {
         UnityEngine.Object.Destroy(this.DefaultTrackerObject);
         this.DefaultTrackerObject = null;
     }
     this.ViewPath = null;
 }
Пример #2
0
 private void InternalInit(float lifeSeconds, Vector3 start, Vector3 target, Transform targetTransform)
 {
     this.LifetimeSeconds = lifeSeconds;
     this.StartLocation   = start;
     this.SetTargetLocation(target);
     this.TargetTracker = targetTransform;
     if (this.ProjectileType.IsMultiStage)
     {
         this.ViewPath = new ProjectileViewMultiStagePath(this);
         return;
     }
     if (this.ProjectileType.Arcs)
     {
         this.ViewPath = new ProjectileViewArcPath(this);
         return;
     }
     this.ViewPath = new ProjectileViewLinearPath(this);
 }