예제 #1
0
 public SSpaceMissileVisualData(
     Vector3 missileWorldPos, Vector3 missileWorldDir, Vector3 missileWorldVel,
     SSpaceMissileClusterVisualData cluster, int clusterId)
     : base(missileWorldPos, missileWorldVel, sharableData: new ClusterData(cluster))
 {
     _sharableData   = new ClusterData(cluster);
     _clusterId      = clusterId;
     visualDirection = missileWorldDir;
 }
예제 #2
0
        public SSpaceMissileClusterVisualData launchCluster(
            Matrix4 launcherWorldMat, Vector3 launchVel, int numMissiles,
            ISSpaceMissileTarget target, float timeToHit,
            SSpaceMissileVisualParameters clusterParams,
            Vector3[] localPositioningOffsets                 = null,
            Vector3[] localDirectionPresets                   = null,
            BodiesFieldGenerator meshPositioningGenerator     = null,
            SSpaceMissileVisualData.AtTargetFunc atTargetFunc = null
            )
        {
            var cluster = new SSpaceMissileClusterVisualData(
                launcherWorldMat, launchVel, numMissiles, target, timeToHit, clusterParams,
                localPositioningOffsets, localDirectionPresets, meshPositioningGenerator,
                atTargetFunc
                );

            _clusters.Add(cluster);
            _targets.Add(target);
            return(cluster);
        }
예제 #3
0
 public virtual SSpaceMissileVisualData createMissile(
     Vector3 pos, Vector3 dir, Vector3 vel, SSpaceMissileClusterVisualData cluster, int clusterId)
 {
     return new SSpaceMissileVisualData (pos, dir, vel, cluster, clusterId);
 }
예제 #4
0
 public ClusterData(SSpaceMissileClusterVisualData cluster)
 {
     this.cluster = cluster;
 }
 public void removeCluster(SSpaceMissileClusterVisualData cluster)
 {
     cluster.terminateAll();
 }
 public SSpaceMissileClusterVisualData launchCluster(
     Matrix4 launcherWorldMat, Vector3 launchVel, int numMissiles,
     ISSpaceMissileTarget target, float timeToHit,
     SSpaceMissileVisualParameters clusterParams,
     Vector3[] localPositioningOffsets = null,
     Vector3[] localDirectionPresets = null,
     BodiesFieldGenerator meshPositioningGenerator = null,
     SSpaceMissileVisualData.AtTargetFunc atTargetFunc = null
 )
 {
     var cluster = new SSpaceMissileClusterVisualData (
         launcherWorldMat, launchVel, numMissiles, target, timeToHit, clusterParams,
         localPositioningOffsets, localDirectionPresets, meshPositioningGenerator,
         atTargetFunc
     );
     _clusters.Add(cluster);
     _targets.Add(target);
     return cluster;
 }
예제 #7
0
 public void removeCluster(SSpaceMissileClusterVisualData cluster)
 {
     cluster.terminateAll();
 }
예제 #8
0
 public virtual SSpaceMissileVisualData createMissile(
     Vector3 pos, Vector3 dir, Vector3 vel, SSpaceMissileClusterVisualData cluster, int clusterId)
 {
     return(new SSpaceMissileVisualData(pos, dir, vel, cluster, clusterId));
 }