void Start() { resetTransform = new TransformData(transform); Level.AddToLevel(this); transform.FindChild("Body").GetComponent<Renderer>().material.color = vehicleColor; }
void Awake() { origin = new Bridger.TransformData(transform); popupAnim = PopupPanel.GetComponent<Animator>(); }
public bool EndStretch() { editing = false; if(partLength < Grid.gridSize) { Destroy(gameObject); return false; } originConnection = SetupConnectionAtPosition(partOrigin); endConnection = SetupConnectionAtPosition(partEnd); rigid.mass = partMass; resetTransform = new TransformData(transform); Level.AddToLevel(this); return true; }