コード例 #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;
 }
コード例 #5
0
 public void removeCluster(SSpaceMissileClusterVisualData cluster)
 {
     cluster.terminateAll();
 }
コード例 #6
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;
 }
コード例 #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));
 }