Ejemplo n.º 1
0
 public override void Construct()
 {
     Cylindre = new ExtCylinder(transform.position,
                                transform.rotation,
                                transform.lossyScale,
                                0.5f,
                                4f);
 }
Ejemplo n.º 2
0
        public static GravityOverrideCylinder DrawCylinder(ExtCylinder cylinder, ExtCircle circle1, ExtCircle circle2, GravityOverrideCylinder cylinderGravity, Color color, out bool hasChanged)
        {
            float sizeLine = cylinder.LocalScale.magnitude / 20;

            hasChanged = false;
            bool changed = hasChanged;

            cylinderGravity.Disc1 = ExtGravityOverrideEditor.DrawDisc(circle1, cylinderGravity.Disc1, color, false, out changed);
            hasChanged            = (changed) ? true : hasChanged;
            cylinderGravity.Disc2 = ExtGravityOverrideEditor.DrawDisc(circle2, cylinderGravity.Disc2, color, false, out changed);
            hasChanged            = (changed) ? true : hasChanged;
            cylinderGravity.Trunk = ExtGravityOverrideEditor.DrawLineTrunk(cylinderGravity.Trunk, cylinder.P1, cylinder.P2, new Color(color.r, color.g, color.b, color.a * 0.8f), sizeLine, out changed);
            hasChanged            = (changed) ? true : hasChanged;
            return(cylinderGravity);
        }