// =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== // =========================================================== // Methods // =========================================================== void OnEnable() { if (drawCall == null) { drawCall = MadDrawCall.Create(); drawCall.gameObject.layer = gameObject.layer; MadTransform.SetLocalScale(drawCall.transform, transform.lossyScale); } panel = GetComponent<MadPanel>(); if (drawCall != null) { MadGameObject.SetActive(drawCall.gameObject, true); } }
// =========================================================== // Methods for/from SuperClass/Interfaces // =========================================================== // =========================================================== // Methods // =========================================================== void OnEnable() { if (drawCall == null) { drawCall = MadDrawCall.Create(); drawCall.gameObject.layer = gameObject.layer; MadTransform.SetLocalScale(drawCall.transform, transform.lossyScale); } panel = GetComponent <MadPanel>(); if (drawCall != null) { MadGameObject.SetActive(drawCall.gameObject, true); } }
private MadDrawCall NextDrawCall() { MadDrawCall drawCall; if (nextDrawCall >= drawCalls.Count) { // create new draw call drawCall = MadDrawCall.Create(); drawCall.gameObject.layer = gameObject.layer; MadTransform.SetLocalScale(drawCall.transform, transform.lossyScale); drawCalls.Add(drawCall); nextDrawCall++; } else { drawCall = drawCalls[nextDrawCall++]; MadGameObject.SetActive(drawCall.gameObject, true); } return(drawCall); }