Exemple #1
0
 public CircularGravity()
 {
     forcePoints           = new List <GameObject>();
     constraintProperties  = new ConstraintProperties();
     specialEffect         = new SpecialEffect();
     pulseProperties       = new PulseProperties();
     triggerAreaFilter     = new TriggerAreaFilter();
     tagFilter             = new TagFilter();
     drawGravityProperties = new DrawGravityProperties();
 }
Exemple #2
0
 public CircularGravity()
 {
     _forceTypeProperties  = new ForceTypeProperties();
     _specialEffect        = new SpecialEffect();
     _gameobjectFilter     = new GameobjectFilter();
     _tagFilter            = new TagFilter();
     _layerFilter          = new LayerFilter();
     _triggerAreaFilter    = new TriggerAreaFilter();
     _constraintProperties = new ConstraintProperties();
     _constraintProperties._gameobjectFilter = new GameobjectFilter();
     _constraintProperties._tagFilter        = new TagFilter();
     _constraintProperties._layerFilter      = new LayerFilter();
     _drawGravityProperties = new DrawGravityProperties();
 }
    void Awake()
    {
        #region Default Settings

        //Used for when dynamically creating a CircularGracity object
        if (radiusProperties == null)
        {
            radiusProperties = new RadiusProperties();
        }
        if (triggerAreaFilter == null)
        {
            triggerAreaFilter = new TriggerAreaFilter();
        }
        if (tagFilter == null)
        {
            tagFilter = new TagFilter();
        }
        if (pulseProperties == null)
        {
            pulseProperties = new PulseProperties();
        }
        if (drawGravityProperties == null)
        {
            drawGravityProperties = new DrawGravityProperties();
        }

        /*
         * //Sets up the line that gets rendered showing the area of forces
         * LineRenderer lineRenderer = gameObject.AddComponent<LineRenderer>();
         * //lineRenderer.material = new Material(Shader.Find("Particles/Additive"));
         * lineRenderer.SetVertexCount(12);
         * lineRenderer.SetWidth(0.05f, 0.05f);
         */
        //Sets up pulse
        if (pulseProperties.pulse)
        {
            radiusProperties.radius = pulseProperties.minSize;
            pulse_Positive          = true;
        }

        transparentColor = new Color();

        #endregion
    }