9 public static Quaternion shadowRotation
13 return Quaternion.Euler(0f, 0f,
RenderData.renderSetting.shadowAngle);
19 public static Vector3 shadowScale
29 public static Vector3 shadowOffset
39 public virtual bool SkipOnMap
49 public virtual string pathSprite
53 return "Scene/Render/Data/";
59 public virtual string prefabName
75 public virtual bool ForceAltHeldPosition
96 this.initialized =
true;
97 this._offset = this.offset;
99 this.hasSubPass = ((meshPass !=
null) ? meshPass.subPass :
null);
101 this.hasSnowPass = ((meshPass2 !=
null) ? meshPass2.snowPass :
null);
106 public virtual void OnInit()
111 public int ConvertTile(
int tile)
113 return tile / 100 * (int)this.pass.pmesh.tiling.x + tile % 100;
119 Vector3 renderPos =
EClass.scene.camSupport.renderPos;
133 p.tile = (float)tile;
140 MeshPass meshPass = (this.hasSubPass &&
SubPassData.Current.enable) ? this.pass.subPass : this.pass;
141 MeshBatch meshBatch = meshPass.batches[meshPass.batchIdx];
142 int num = (p.tile > 0f) ? 1 : -1;
143 if (this.useOffsetBack)
145 this._offset = ((p.dir == 2 || p.dir == 3) ? this.offsetBack : this.offset);
147 if (meshPass == this.pass.subPass)
149 meshBatch.colors[meshPass.idx] = p.color - 1572864f;
154 meshBatch.colors[meshPass.idx] = p.color;
155 meshBatch.matrices[meshPass.idx].m03 = p.x + this._offset.x * (float)num;
156 meshBatch.matrices[meshPass.idx].m13 = p.y + this._offset.y;
157 meshBatch.matrices[meshPass.idx].m23 = p.z + this._offset.z;
159 meshBatch.tiles[meshPass.idx] = p.tile + (float)(p.liquidLv * 10000 * num);
161 if (meshPass.idx == meshPass.batchSize)
163 meshPass.NextBatch();
168 private void OnValidate()
170 this._offset = this.offset;
174 public void DrawRepeatTo(
RenderParam p,
float maxY,
float height, ref Vector3 peakFix,
bool skipFirst =
false,
int fire = 0,
bool isBlock =
false)
176 int num = (int)((maxY + height + peakFix.x - p.y) / peakFix.y);
188 p.snow = (!isBlock && snow);
189 for (
int i = 0; i < num + 1; i++)
193 p.y = maxY + height - peakFix.y;
194 p.z -= peakFix.z + peakFix.x;
199 if (i != 0 && num > 1)
208 if (fire > 0 && i != num)
210 EClass.screen.tileMap.rendererEffect.Draw(p, fire);
221 public void DrawRepeat(
RenderParam p,
int count,
float size,
bool skipFirst =
false)
235 for (
int i = 0; i < count; i++)
241 if (i != 0 || !skipFirst)
245 p.y += RenderData.renderSetting.peakFix.y * size;
246 p.z += RenderData.renderSetting.peakFix.z * size;
253 public virtual void DrawWithRotation(
RenderParam p,
float angle)
260 int num = (p.tile > 0f) ? 1 : -1;
261 MeshPass shadowPass = this.pass.shadowPass;
262 MeshBatch meshBatch = shadowPass.batches[shadowPass.batchIdx];
263 meshBatch.matrices[shadowPass.idx].SetTRS(p.NewVector3 +
this.offset +
RenderData.shadowOffset,
RenderData.shadowRotation,
RenderData.shadowScale);
264 meshBatch.tiles[shadowPass.idx] = p.tile;
266 if (shadowPass.idx == shadowPass.batchSize)
268 shadowPass.NextBatch();
272 shadowPass = this.pass.shadowPass;
273 MeshBatch meshBatch2 = shadowPass.batches[shadowPass.batchIdx];
274 meshBatch2.matrices[shadowPass.idx].SetTRS(p.v +
this.offsetShadow,
RenderData.shadowRotation,
RenderData.shadowScale);
275 meshBatch2.tiles[shadowPass.idx] = p.tile - this.pass.pmesh.tiling.x * (float)num;
277 if (shadowPass.idx == shadowPass.batchSize)
279 shadowPass.NextBatch();
285 public const int HeldLightMod = 1572864;
288 public static Quaternion deadRotation = Quaternion.Euler(0f, 0f, 90f);
291 protected Vector3 _offset;
303 public Vector3 offset;
306 public Vector3 offsetBack;
309 public Vector3 offsetShadow;
312 public Vector3 heldPos;
315 public Vector2 imagePivot =
new Vector2(0.5f, 0.25f);
318 public Vector2 imageScale =
new Vector2(1f, 1f);
324 public bool multiSize;
330 public bool useOffsetBack;
333 public bool persistActor;
336 public bool symmetry =
true;
339 public float hangedFixZ;
355 public bool initialized;
359 private Sprite _sprite;
363 public bool hasSubPass;
367 public bool hasSnowPass;