public void initialise(ASPPainter painter) { _painter = painter; ScreenMessages.PostScreenMessage("Paint Pointer - RMB or Escape to exit", 5, ScreenMessageStyle.UPPER_CENTER); if (_pointer == null) { GameObject modelObject = GameDatabase.Instance.GetModel(_pointerModel).gameObject; _pointer = Instantiate(modelObject) as GameObject; Collider[] colliders = _pointer.GetComponentsInChildren<Collider>(true); foreach (Collider collider in colliders) { Destroy(collider); } _meshRenderers = _pointer.GetComponentsInChildren<MeshRenderer>(true); foreach (MeshRenderer mesh in _meshRenderers) { mesh.material = new Material(Shader.Find("Transparent/Diffuse")); } _pointer.SetActive(true); } GameEvents.onVesselChange.Add(new EventData<Vessel>.OnEvent(this.OnVesselChange)); }
public void setPainter(ASPPainter painter) { _painter = painter; }
public void finalisePainting() { if (_usedPaint == true && _startState != StartState.Editor) { if (_painter != null) { _painter.usePaint(); _painter = null; } _usedPaint = false; } _gui = null; }