Exemple #1
0
    /***********************************************************
    **	Ctor's
    ***********************************************************/
    public FXRoad(IRoadFunction fx,
                  float roadWidth,
                  float lineSize,
                  Material lineMaterial,
                  GameObject[] obsticlePrefabList,
                  int historySize,
                  int numOfHorizontalPointsInRoad,
                  Transform parent,
                  float step)
    {
        _step = step;

        _roadWidth          = roadWidth;
        _fx                 = fx;
        _obsticlePrefabList = obsticlePrefabList;
        _FrameLineList      = new List <LineFrame>();
        _FramePointList     = new List <PointFrame>();

        _lineSize     = lineSize;
        _lineMaterial = lineMaterial;

        _historySize = historySize;
        _numOfHorizontalPointsInRoad = numOfHorizontalPointsInRoad;

        _parent = parent;
    }
Exemple #2
0
 /***********************************************************
 **	Ctor's
 ***********************************************************/
 /// <summary>
 /// Initializes a new instance of the <see cref="FXRunnerManager"/> class.
 /// </summary>
 /// <param name="parent">Parent.</param>
 /// <param name="fx">Fx.</param>
 /// <param name="lineMaterial">Line material.</param>
 /// <param name="obsticlePrefabList">Obsticle prefab list.</param>
 /// <param name="roadDistanceFromXPosition">Road distance from camera.</param>
 /// <param name="startSpeed">Start speed.</param>
 public FXRunnerManager(Transform parent,
                        IRoadFunction fx,
                        Material lineMaterial,
                        GameObject[] obsticlePrefabList,
                        float roadDistanceFromXPosition,
                        float startSpeed)
 {
     resetTime();
     Fx    = fx;
     speed = startSpeed;
     _roadDistanceFromXPosition = roadDistanceFromXPosition;
     fxRoad = new FXRoad(fx, 60, .3f, lineMaterial, obsticlePrefabList, 20, 8, parent, .5f);
 }