Created
January 24, 2019 20:08
-
-
Save karl-/d809129527521dab657559bcd2e76150 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.ProBuilder; | |
namespace PipeDreams | |
{ | |
public class PipeManager : MonoBehaviour | |
{ | |
public float extrudeSpeed = 1f; | |
public float minExtrudeDistance = 2f; | |
public float maxExtrudeDistance = 20f; | |
static List<Pipe> s_Pipes = new List<Pipe>(); | |
void Start() | |
{ | |
ProBuilderMesh mesh = ShapeGenerator.CreateShape(ShapeType.Cube); | |
Pipe pipe = mesh.gameObject.AddComponent<Pipe>(); | |
s_Pipes.Add(pipe); | |
pipe.Begin(extrudeSpeed, minExtrudeDistance, maxExtrudeDistance); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment