@ -0,0 +1,16 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
public class HumptyDumptyFollow : MonoBehaviour | |||||
{ | |||||
public Transform Centre; | |||||
public Vector3 Offset; | |||||
// Update is called once per frame | |||||
void Update() | |||||
{ | |||||
transform.position = Centre.position + Offset; | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: 48503f69a7f0ea9458ae404e5b00ffd9 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |
@ -0,0 +1,17 @@ | |||||
using System.Collections; | |||||
using System.Collections.Generic; | |||||
using UnityEngine; | |||||
public class SetHorseMat : MonoBehaviour | |||||
{ | |||||
public List<Material> allMats; | |||||
// Start is called before the first frame update | |||||
void Start() | |||||
{ | |||||
int randomIndex = Random.Range(0, allMats.Count - 1); | |||||
Debug.Log("RandomIndex: " + randomIndex); | |||||
GetComponentInChildren<Renderer>().material = allMats[randomIndex]; | |||||
} | |||||
} |
@ -0,0 +1,11 @@ | |||||
fileFormatVersion: 2 | |||||
guid: c16c4586273f9b84e97fcbbb885db687 | |||||
MonoImporter: | |||||
externalObjects: {} | |||||
serializedVersion: 2 | |||||
defaultReferences: [] | |||||
executionOrder: 0 | |||||
icon: {instanceID: 0} | |||||
userData: | |||||
assetBundleName: | |||||
assetBundleVariant: |