// Use this for initialization void Start() { spray = GetComponentInChildren <PainterScript>(); if (!startWithSpray) { spray.setUnactive(); } }
// Use this for initialization private void Start() { _MeshRenderer = GetComponent <MeshRenderer>(); _Animator = GetComponent <Animator>(); _PlayerMeshRenderer = transform.parent.gameObject.GetComponent <MeshRenderer>(); _PlayerPainter = GetComponentInParent <PainterScript>(); _PlayerPainter.OnColorChanged += UpdateColorInfo; ColorChecker.GetComponent <ColorDetectorScript>().OnAbsorbablesChanged += UpdateDetectedColor; }
void Awake() { if (Instance != null) { Debug.LogError("More than one Painter has been instanciated in this scene!"); } Instance = this; if (PaintPrefab == null) { Debug.LogError("Missing Paint decal prefab!"); } }
void Start() { if (Instance != null) { Debug.LogError("More than one Painter has been instanciated in this scene!"); } Instance = this; if (PaintPrefab == null) { Debug.LogError("Missing Paint decal prefab!"); } mouseLook = GetComponentInParent <MouseLook>(); slider.maxValue = maxCapacity; slider.value = capacity; }
void Start() { S = this; resetPos = transform.position; rb = gameObject.GetComponent<Rigidbody>(); source = GetComponent<AudioSource> (); var inputDevice = InputManager.ActiveDevice; }