예제 #1
0
 public void Do()
 {
     if (firstTime)
     {
         firstTime = false;
         return;
     }
     go.SetActive(true);
     rendererStation.UseIt(go, objectWidth);
     onNeedUpdate?.Invoke();
 }
예제 #2
0
        public PaintCommand(RendererStation rendererStation, GameObject go, float objectWidth, Action onNeedUpdate)
        {
            Assert.ArgumentNotNull(rendererStation, nameof(rendererStation));
            Assert.ArgumentNotNull(go, nameof(go));

            this.rendererStation = rendererStation;
            this.go           = go;
            this.objectWidth  = Mathf.Clamp(objectWidth, 0, float.MaxValue);
            this.onNeedUpdate = onNeedUpdate;
            rendererStation.UseIt(go, objectWidth);
        }