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; }
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); }