UI update 02

This commit is contained in:
FloatGaming
2026-06-30 21:21:30 +08:00
parent b2a1e307a4
commit f62f643cfc
1666 changed files with 211081 additions and 22799 deletions
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7211fb1bd21140c409c7434a41eb3c76
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
+9
View File
@@ -0,0 +1,9 @@
1. Increased Performance
2. Added Demo Scene
3. Made visualising mask and collision better
4. Small changes to prefab scripts
5. New overloads for destruction methods(you can destroy an object with destruction types defined elsewhere : call Destruction.Setup() first)
6. Added different Colors for different destruction on same object
7. Added max chunk count functionality
8. Fixed a small bug with burntime
9. Fixed a silly bug with shader that made fps worse
+14
View File
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: e23c02b5a5d3a234db9d598a7e38557d
TextScriptImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Changes.txt
uploadId: 925032
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6f7bdefd32cc290438577a42823ca126
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 2af252442079b524e97d60543408a92f
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,30 @@
using System;
using UnityEngine;
namespace KD.Destro2D{
[Serializable]
public class CircleDestruction : Destruction
{
public float radius = 0.3f;
EllipseDestruction e;
public override void Setup(GameObject gobj)
{
e.Setup(gobj);
}
public override void SetupWithColor(GameObject gobj, Color color)
{
Setup(gobj);
burnColor = color;
}
public override void ApplyDestruction(int cx, int cy, bool[,] mask, float stepX, float stepY,int maskW,int maskH,Color32[]burnage, float burntime)
{
e.rx = radius;
e.ry = radius;
e.ApplyDestruction(cx,cy,mask,stepX,stepY,maskW,maskH,burnage,burntime);
}
public CircleDestruction()
{
e = new EllipseDestruction();
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: c38b0a6170f7b7b419c3c2c0ad2acf89
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Core/Destruction Types/CircleDestruction.cs
uploadId: 925032
@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace KD.Destro2D{
[Serializable]
public class EllipseDestruction : Destruction
{
public float rx = 0.3f;
public float ry = 0.3f;
Sprite sprite;
float normalX;
float normalY;
List<int> destroyed = new();
public override void Setup(GameObject gobj)
{
SpriteRenderer sprend = gobj.GetComponent<SpriteRenderer>();
sprite = sprend.sprite;
normalX=gobj.transform.localScale.x;
normalY=gobj.transform.localScale.y;
}
public override void SetupWithColor(GameObject gobj, Color color)
{
Setup(gobj);
burnColor = color;
}
public override void ApplyDestruction(int cx, int cy, bool[,] mask, float stepX, float stepY,int maskW,int maskH,Color32[] burnage, float burntime)
{
destroyed.Clear();
float rpx = rx * sprite.pixelsPerUnit/normalX;
float rpy = ry * sprite.pixelsPerUnit/normalY;
int cmx = Mathf.FloorToInt(cx/stepX);
int cmy = Mathf.FloorToInt(cy/stepY);
int rmx = (int)(rpx/stepX);
int rmy = (int)(rpy/stepY);
for (int i = cmx - rmx; i <= cmx + rmx; i++){
if(i >= maskW || i < 0) continue;
float dx = i - cmx;
float nx = dx/rmx;
for (int j = cmy - rmy; j <= cmy + rmy; j++)
{
if (j < 0 ||j >= maskH) continue;
float dy = j - cmy;
float ny = dy/rmy;
if (nx * nx + ny * ny <= 1f){
mask[i, j] = false;
destroyed.Add(j * maskW + i);
}
}
}
BurnEdge(destroyed,maskW,maskH,mask,burnage,burntime);
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 85cc06dd67d78f847b096890f2223790
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Core/Destruction Types/EllipseDestruction.cs
uploadId: 925032
@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace KD.Destro2D{
[Serializable]
public class RectDestruction : Destruction
{
public float l = 0.3f;
public float b = 0.3f;
Sprite sprite;
List<int> destroyed = new();
float normalX;
float normalY;
public override void Setup(GameObject gobj)
{
SpriteRenderer sprend = gobj.GetComponent<SpriteRenderer>();
sprite = sprend.sprite;
normalX=gobj.transform.localScale.x;
normalY=gobj.transform.localScale.y;
}
public override void SetupWithColor(GameObject gobj, Color color)
{
Setup(gobj);
burnColor = color;
}
public override void ApplyDestruction(int cx, int cy, bool[,] mask, float stepX, float stepY,int maskW,int maskH,Color32[] burnage, float burntime)
{
destroyed.Clear();
float lp = l * sprite.pixelsPerUnit/normalX;
float bp = b * sprite.pixelsPerUnit/normalY;
int cmx = Mathf.FloorToInt(cx/stepX);
int cmy = Mathf.FloorToInt(cy/stepY);
int lm = (int)(lp/stepX);
int bm = (int)(bp/stepY);
for (int i = cmx - lm; i <= cmx + lm; i++){
if(i >= maskW || i < 0) continue;
for (int j = cmy - bm; j <= cmy + bm; j++)
{
if (j < 0 ||j >= maskH) continue;
mask[i, j] = false;
destroyed.Add(j * maskW + i);
}
}
BurnEdge(destroyed,maskW,maskH,mask,burnage,burntime);
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 59ed6c62a15ec3141998da30fc21c102
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Core/Destruction Types/RectDestruction.cs
uploadId: 925032
@@ -0,0 +1,77 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace KD.Destro2D{
[Serializable]
public class StampDestruction : Destruction
{
public Texture2D stampTexture;
public float scaleFactor;
public float rotationAngle;
private int stampWidth;
private int stampHeight;
private Color[] stampPixels;
float normalX;
float normalY;
List<int> destroyed = new();
public override void Setup(GameObject gobj)
{
stampWidth = stampTexture.width;
stampHeight = stampTexture.height;
stampPixels = stampTexture.GetPixels();
normalX = gobj.transform.localScale.x;
normalY = gobj.transform.localScale.y;
}
public override void SetupWithColor(GameObject gobj, Color color)
{
Setup(gobj);
burnColor = color;
}
public override void ApplyDestruction(int cx, int cy, bool [,] mask, float stepX, float stepY,int maskW,int maskH,Color32[] burnage, float burntime)
{
destroyed.Clear();
float rotRad = rotationAngle * Mathf.Deg2Rad;
int cmx = Mathf.FloorToInt(cx / stepX);
int cmy = Mathf.FloorToInt(cy / stepY);
int sw = Mathf.FloorToInt(stampWidth /(scaleFactor*normalX * stepX));
int sh = Mathf.FloorToInt(stampHeight /(scaleFactor*normalY * stepY));
float c = Mathf.Cos(rotRad);
float s = Mathf.Sin(rotRad);
for(int i = 0; i< sw; i++)
{
int x = cmx + i - sw/2; //offsetting to centre (-sw/2)
if(x < 0 || x >= maskW) continue;
for(int j = 0; j < sh; j++)
{
int y = cmy + j - sh/2;
if(y < 0 || y>=maskH) continue;
float dx = i - 0.5f * sw;//make x and y centred(-ve and +ve around midpoint)
float dy = j - 0.5f * sh;
float ux = dx * stepX * scaleFactor * normalX;
float uy = dy * stepY * scaleFactor * normalY;
float rx = ux * c - uy * s;
float ry = ux * s + uy * c;
int px = Mathf.FloorToInt(rx + stampWidth * 0.5f);
int py = Mathf.FloorToInt(ry + stampHeight * 0.5f);
if(px < 0|| py < 0 || px >= stampWidth|| py >= stampHeight) continue;
int indx = py * stampWidth + px;
if(stampPixels[indx].a > 0.1f)
{
mask[x,y] = false;
destroyed.Add(y * maskW + x);
}
}
}
BurnEdge(destroyed,maskW,maskH,mask,burnage,burntime);
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 623659f1a080fc54a97298c5b8e07174
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Core/Destruction Types/StampDestruction.cs
uploadId: 925032
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: caeb7972101235344a85482afc9d5ae1
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,361 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace KD.Destro2D{
[RequireComponent(typeof(PolygonCollider2D))]
[RequireComponent(typeof(PixelHandler))]
public class CollisionHandler : MonoBehaviour
{
public int maskWidth = 64;
public int maskHeight = 64;
public bool HasInit()=>init;
Color[] rectPixels;
float stepX;
float stepY;
bool[,] collisionMask;
PolygonCollider2D polyCollider;
PixelHandler pHandler;
SpriteRenderer sprend;
public Vector2[,] posGrid{get;private set;}
List<(Vector2,Vector2)> segments = new();
float cellWidth,cellHeight;
bool init = false;
public bool collisionDebug = false;
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void InitialiseCollision()//initialise only after pixel handler initialises
{
if(HasInit()) return;
pHandler = GetComponent<PixelHandler>();
sprend = GetComponent<SpriteRenderer>();
polyCollider = GetComponent<PolygonCollider2D>();
if (!pHandler.HasInit())
{
Debug.LogWarning("Has not initialised visuals before collisions! Quitting.");
return;
}
rectPixels = pHandler.rectPixels;
int texWidth = sprend.sprite.texture.width;
int texHeight = sprend.sprite.texture.height;
stepX = (float)texWidth/maskWidth;
stepY = (float)texHeight/maskHeight;
BuildCollisionMask(texWidth,texHeight);
Make2DLocalGrid();
segments.Clear();
pHandler.SyncToVisual(collisionMask,maskWidth,maskHeight);
MarchingSquares();
pHandler.DoStuffOnVisualUpdate+=CollisionUpdater;
init = true;
}
void BuildCollisionMask(int texwidth, int texheight)
{
collisionMask = new bool[maskWidth, maskHeight];
posGrid = new Vector2[maskWidth,maskHeight];
for(int i = 0; i < maskWidth; i++)
{
for(int j = 0; j < maskHeight; j++)
{
int px = (int)(i * stepX);
int py = (int)(j * stepY);
if(px < 0||py<0||px>=texwidth||py>=texheight) continue;
collisionMask[i,j] = rectPixels[py * texwidth + px].a > 0.1f;
}
}
}
void Make2DLocalGrid()
{
Bounds b = sprend.sprite.bounds;
Vector2 origin = b.min;
cellWidth = b.size.x/maskWidth;
cellHeight = b.size.y/maskHeight;
for(int i = 0; i < maskWidth; i++)
{
for(int j = 0; j < maskHeight; j++)
{
Vector2 pos = origin + new Vector2(i * cellWidth, j * cellHeight);
posGrid[i,j] = pos;
}
}
}
void CollisionUpdater()
{
segments.Clear();
pHandler.SyncToVisual(collisionMask,maskWidth,maskHeight);
MarchingSquares();
}
void MarchingSquares() //determines collider edges and calls function to build collider
{
for(int i = -1; i <= maskWidth; i++)
{
for(int j = -1; j <= maskHeight; j++)
{
//anti clockwise
bool c1 = GetMask(i,j);
bool c2 = GetMask(i+1,j);
bool c3 = GetMask(i+1,j+1);
bool c4 = GetMask(i,j+1);
int val = (c1 ? 1:0)+(c2 ? 2:0)+(c3 ? 4:0)+(c4 ? 8:0);
if(val == 0 || val == 15) continue;
Vector2 p00 = GetPos(i, j);
Vector2 p10 = GetPos(i+1, j);
Vector2 p11 = GetPos(i+1, j+1);
Vector2 p01 = GetPos(i, j+1);
Vector2 M(Vector2 a, Vector2 b) => (a + b) * 0.5f;
switch (val)
{
case 1:
segments.Add((M(p00, p01), M(p00, p10)));
break;
case 2:
segments.Add((M(p00, p10), M(p10, p11)));
break;
case 3:
segments.Add((M(p00, p01), M(p10, p11)));
break;
case 4:
segments.Add((M(p10, p11), M(p01, p11)));
break;
case 5:
segments.Add((M(p00, p10), M(p01, p11)));
break;
case 6:
segments.Add((M(p00, p10), M(p01, p11)));
break;
case 7:
segments.Add((M(p00, p01), M(p01, p11)));
break;
case 8:
segments.Add((M(p01, p11), M(p00, p01)));
break;
case 9:
segments.Add((M(p01, p11), M(p00, p10)));
break;
case 10:
segments.Add((M(p10, p11), M(p00, p01)));
break;
case 11:
segments.Add((M(p01, p11), M(p11, p10)));
break;
case 12:
segments.Add((M(p00, p01), M(p10, p11)));
break;
case 13:
segments.Add((M(p10, p11), M(p00, p10)));
break;
case 14:
segments.Add((M(p00, p10), M(p01, p00)));
break;
}
}
}
BuildCollider();
}
bool GetMask(int x, int y)
{
if(x < 0 || y < 0 || x >= maskWidth || y >= maskHeight)
return false;
return collisionMask[x,y];
}
Vector2 GetPos(int x, int y)
{
int cx = Mathf.Clamp(x,0,maskWidth-1);
int cy = Mathf.Clamp(y,0,maskHeight-1);
Vector2 pos = posGrid[cx,cy];
if(x < 0)
{
pos.x -= cellWidth;
}else if(x >= maskWidth)
{
pos.x += cellWidth;
}
if(y < 0)
{
pos.y -= cellHeight;
}else if(y >= maskHeight)
{
pos.y += cellHeight;
}
return pos;
}
void BuildCollider()
{
float snap = 0.001f;
Vector2 Snap(Vector2 v)
{
return new Vector2(
Mathf.Round(v.x / snap) * snap,
Mathf.Round(v.y / snap) * snap
);
}
Dictionary<Vector2, List<Vector2>> graph = new();
foreach (var seg in segments)
{
Vector2 a = Snap(seg.Item1);
Vector2 b = Snap(seg.Item2);
if (!graph.ContainsKey(a)) graph[a] = new();
if (!graph.ContainsKey(b)) graph[b] = new();
graph[a].Add(b);
graph[b].Add(a);
}
if (graph.Count == 0)
{
polyCollider.pathCount = 0;
return;
}
HashSet<Vector2> vis = new();
List<List<Vector2>> loops = new();
foreach(var start in graph.Keys)
{
if(vis.Contains(start)) continue;
var l = Looper(start,graph,vis);
if(l.Count >= 3)
loops.Add(l);
}
polyCollider.pathCount = loops.Count;
for (int i = 0; i < loops.Count; i++)
{
Vector2[] local = new Vector2[loops[i].Count];
for (int j = 0; j < loops[i].Count; j++)
{
local[j] = loops[i][j];
}
polyCollider.SetPath(i, local);
}
}
List<Vector2> Looper(Vector2 start, Dictionary<Vector2, List<Vector2>> graph, HashSet<Vector2> visited)
{
List<Vector2> loop = new();
Vector2 current = start;
Vector2 prev = new(float.NaN, float.NaN);
loop.Add(current);
int count = 0;
while (true)
{
visited.Add(current);
bool moved = false;
foreach(var n in graph[current])
{
if (prev != n && !visited.Contains(n))
{
prev = current;
current = n;
loop.Add(current);
moved = true;
break;
}
}
if(!moved)
{
break;
}
count ++;
if(count > 1000) break;
}
return loop;
}
public Vector2 GetPosOnDifferent(int x, int y, int mWidth, int mHeight)
{
float stepX = maskWidth/mWidth;
float stepY = maskHeight/mHeight;
int mx = Mathf.FloorToInt(x * stepX);
int my = Mathf.FloorToInt(y * stepY);
if(mx < 0||my<0||mx>=maskWidth||my>=maskHeight){
throw new IndexOutOfRangeException("Position out of bounds");
}
return posGrid[mx,my];
}
//only for visualising collision mask and edges
void OnDrawGizmosSelected()
{
if(!sprend || !collisionDebug || !HasInit()) return;
Bounds b = sprend.sprite.bounds;
Vector2 origin = b.min;
for (int x = 0; x < maskWidth; x++)
{
for (int y = 0; y < maskHeight; y++)
{
if (!collisionMask[x, y]) continue;
Vector2 center = origin + new Vector2(
x * cellWidth + cellWidth * 0.5f,
y * cellHeight + cellHeight * 0.5f
);
Vector3 centerWorld = transform.TransformPoint(center);
Gizmos.color = Color.green;
Gizmos.DrawCube(centerWorld, new Vector3(cellWidth * 0.9f * transform.localScale.x, cellHeight * 0.9f * transform.localScale.y, 0.01f));
}
}
if (segments == null)
return;
Gizmos.color = Color.blue;
foreach (var seg in segments)
{
Vector3 A = transform.TransformPoint(seg.Item1);
Vector3 B = transform.TransformPoint(seg.Item2);
Gizmos.DrawLine(A, B);
Gizmos.DrawSphere(A, 0.01f);
Gizmos.DrawSphere(B, 0.01f);
}
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a6483c7bdbae77c4186cbd3b87097918
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Core/Main/CollisionHandler.cs
uploadId: 925032
@@ -0,0 +1,175 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace KD.Destro2D{
[RequireComponent(typeof(PixelHandler))]
[RequireComponent(typeof(CollisionHandler))]
[RequireComponent(typeof(SplitHandler))]
public class Destro2DMain : MonoBehaviour
{
[SerializeReference]
public List<Destruction> destructionList = new();
PixelHandler pHandler;
SpriteRenderer sprend;
CollisionHandler cHandler;
SplitHandler sHandler;
CircleDestruction fracture;
public Action<Vector2> OnDestruction;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void OnEnable()
{
Initialise();
fracture = new();
fracture.Setup(this.gameObject);
}
// Update is called once per frame
void Update()
{
}
public void DynamicDestroyWorld(Vector2 world)
{
Vector2 loc = transform.InverseTransformPoint(world);
(int cx, int cy) = Destruction.LocToPixel(loc,sprend);
foreach(Destruction d in destructionList)
{
pHandler.DestroyMask(d,cx,cy);
}
OnDestruction?.Invoke(world);
}
public void DynamicDestroyLocal(Vector2 loc)
{
(int cx, int cy) = Destruction.LocToPixel(loc,sprend);
foreach(Destruction d in destructionList)
{
pHandler.DestroyMask(d,cx,cy);
}
OnDestruction?.Invoke(loc);
}
public void DynamicDestroyLocal(Vector2 loc, List<Destruction> dlist)
{
(int cx, int cy) = Destruction.LocToPixel(loc,sprend);
foreach(Destruction d in dlist)
{
pHandler.DestroyMask(d,cx,cy);
}
OnDestruction?.Invoke(loc);
}
public void DynamicDestroyWorld(Vector2 world, List<Destruction> dlist)
{
Vector2 loc = transform.InverseTransformPoint(world);
(int cx, int cy) = Destruction.LocToPixel(loc,sprend);
foreach(Destruction d in dlist)
{
pHandler.DestroyMask(d,cx,cy);
}
OnDestruction?.Invoke(world);
}
public void DynamicFracture(Vector2 world, float Rcore, float Router, float noiseScale,float thickness, int lines)
{
Vector2 loc = transform.InverseTransformPoint(world);
(int cx, int cy) = Destruction.LocToPixel(loc,sprend);
fracture.radius = thickness;
float seed = UnityEngine.Random.Range(10,100);
float step = 0.1f;
float[] angles = new float[lines];
for (int i = 0; i < lines; i++)
{
angles[i] = i * Mathf.PI * 2f / lines
+ UnityEngine.Random.Range(-20, 20) * Mathf.Deg2Rad;
}
float bendStrength = 1.5f * Mathf.Deg2Rad;
foreach (float baseAngle in angles)
{
float angle = baseAngle;
for (float r = Rcore; r <= Router; r += step)
{
Vector2 dir = new Vector2(Mathf.Cos(angle), Mathf.Sin(angle));
Vector2 p = world + dir * r;
float wobble = Mathf.PerlinNoise(
(p.x * noiseScale) + seed,
(p.y * noiseScale) + seed
) * 2f - 1f;
angle += wobble * bendStrength;
FractureHelper(p,thickness);
}
}
OnDestruction?.Invoke(world);
}
public void Initialise()
{
pHandler = GetComponent<PixelHandler>();
sprend = GetComponent<SpriteRenderer>();
cHandler = GetComponent<CollisionHandler>();
sHandler = GetComponent<SplitHandler>();
pHandler.Initialise();
cHandler.InitialiseCollision();
sHandler.InitialiseSplit();
foreach(Destruction d in destructionList)
{
d.Setup(this.gameObject);
}
}
public void AddStampDestruction(Texture2D stampTex, float scale, float rot)
{
StampDestruction stmp = new StampDestruction();
stmp.stampTexture = stampTex;
stmp.scaleFactor = scale;
stmp.rotationAngle = rot;
stmp.Setup(this.gameObject);
destructionList.Add(stmp);
}
public void AddCircleDestruction(float radius)
{
CircleDestruction cd = new CircleDestruction();
cd.radius = radius;
cd.Setup(this.gameObject);
destructionList.Add(cd);
}
public void AddEllipseDestruction(float radiusX, float radiusY)
{
EllipseDestruction ed = new EllipseDestruction();
ed.rx = radiusX;
ed.ry = radiusY;
ed.Setup(this.gameObject);
destructionList.Add(ed);
}
public void AddRectDestruction(float l, float b)
{
RectDestruction rd = new RectDestruction();
rd.l = l;
rd.b = b;
rd.Setup(this.gameObject);
destructionList.Add(rd);
}
public void InheritDestruction(GameObject src)
{
if(src.TryGetComponent<Destro2DMain>(out var d))
{
destructionList = d.destructionList;
}
}
void FractureHelper(Vector2 world, float radius)
{
Vector2 loc = transform.InverseTransformPoint(world);
(int cx, int cy) = Destruction.LocToPixel(loc,sprend);
pHandler.DestroyMask(fracture,cx,cy);
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 3ead6d33feb996340b43f15ce524b4e7
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Core/Main/Destro2DMain.cs
uploadId: 925032
@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace KD.Destro2D{
[Serializable]
public abstract class Destruction
{
protected Color burnColor = Color.white;
public static List<GameObject> chunks = new();
public abstract void Setup(GameObject gobj);
public abstract void SetupWithColor(GameObject gobj, Color color);
public abstract void ApplyDestruction(int cx, int cy, bool[,] mask, float stepX, float stepY,int maskW, int mmaskH,Color32[] burnage, float burntime);
public static (int cx, int cy) LocToPixel(Vector2 loc, SpriteRenderer sprend)
{
Sprite s = sprend.sprite;
Bounds b = s.bounds;
float spw = s.rect.width;
float sph = s.rect.height;
float uvx = (loc.x - b.min.x)/b.size.x;
float uvy = (loc.y - b.min.y)/b.size.y;
int cx = Mathf.FloorToInt(uvx * spw);
int cy = Mathf.FloorToInt(uvy * sph);
return (cx,cy);
}
protected void BurnEdge(List<int> destroyed, int width, int height, bool[,] mask, Color32[] burnage, float burntime)
{
foreach (int i in destroyed)
{
int x = i % width;
int y = i / width;
TryBurn(x + 1, y);
TryBurn(x - 1, y);
TryBurn(x, y + 1);
TryBurn(x, y - 1);
}
void TryBurn(int nx, int ny)
{
if (nx < 0 || ny < 0 || nx >= width || ny >= height)
return;
if (mask[nx, ny])
{
int nidx = ny * width + nx;
burnage[nidx] = burnColor;
}
}
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 1836b5c3ec02ee04394ff03d708ed6d4
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Core/Main/Destruction.cs
uploadId: 925032
@@ -0,0 +1,228 @@
using System;
using System.Collections;
using System.Linq;
using UnityEngine;
namespace KD.Destro2D{
public class PixelHandler : MonoBehaviour
{
public Material maskerMaterial;
public int maskWidth = 128, maskHeight = 128;
public bool HasInit() => init;
public bool IsDirty() => isDirty;
public int burnDecay = 1;
public float burnTime = 5f;
SpriteRenderer sprend;
public Texture2D runtimeTex{get; private set;}
bool[,] visualMask;
int width, height;
float stepX, stepY;
public Color[] rectPixels{get; private set;}
Texture2D maskTex;
bool isDirty = false;
bool init = false;
public Action DoStuffOnVisualUpdate;
Color32[] burnAge;
Color32[] maskPixels;
void Update()
{
}
public void Initialise(Color[] cachedRectPixels = null, Texture2D cachedRunTimeTex = null,bool isChunk = false)
{
if(HasInit()) return;
sprend = GetComponent<SpriteRenderer>();
Texture2D src = sprend.sprite.texture;
Rect srcRect = sprend.sprite.rect;
width = (int)srcRect.width;
height = (int)srcRect.height;
if(cachedRectPixels == null)
rectPixels = src.GetPixels((int)srcRect.x, (int)srcRect.y,width,height);
else
rectPixels = cachedRectPixels;
if(cachedRunTimeTex == null){
runtimeTex = new Texture2D(width,height,TextureFormat.RGBA32,false);
runtimeTex.SetPixels(rectPixels);
runtimeTex.Apply();
}
else
{
runtimeTex = cachedRunTimeTex;
}
if(!isChunk)
sprend.sprite = Sprite.Create(runtimeTex, new Rect(0,0,width,height),new Vector2(0.5f,0.5f),sprend.sprite.pixelsPerUnit);
stepX = (float)width/maskWidth;
stepY = (float)height/maskHeight;
maskTex = new Texture2D(maskWidth, maskHeight, TextureFormat.RGBA32,false);
maskTex.filterMode = FilterMode.Point;
sprend.sharedMaterial = maskerMaterial;
var block = new MaterialPropertyBlock();
sprend.GetPropertyBlock(block);
block.SetTexture("_MainTex", runtimeTex);
block.SetTexture("_MaskTex", maskTex);
block.SetVector("_MaskTexelSize",new Vector2(1f / maskTex.width, 1f / maskTex.height));
sprend.SetPropertyBlock(block);
InitialiseMask();
ApplyMaskToTexture();
init = true;
}
private void InitialiseMask()
{
maskPixels = new Color32[maskWidth * maskHeight];
burnAge = new Color32[maskWidth * maskHeight];
visualMask = new bool[maskWidth,maskHeight];
for(int i = 0; i< maskWidth; i++)
{
for(int j = 0; j< maskHeight; j++)
{
int px = (int)(i * stepX);
int py = (int)(j * stepY);
if(px < 0||py<0||px>=width||py>=height) continue;
visualMask[i,j] = rectPixels[py * width + px].a > 0.1f;
}
}
}
public void ImmediateMaskUpdate(SplitHandler split)
{
if(split)
ApplyMaskToTexture();
}
void OnEnable()
{
StartCoroutine(CheckDirty());
}
private void SetDirty()
{
isDirty = true;
}
IEnumerator CheckDirty()
{
while (true)
{
if(isDirty) {
ApplyMaskToTexture();
isDirty = false;
}
yield return new WaitForSeconds(0.01f);
}
}
private void ApplyMaskToTexture()
{
for(int i = 0; i < maskWidth; i++)
{
for(int j = 0; j < maskHeight; j++)
{
int idx = j * maskWidth + i;
byte solid = visualMask[i,j] ? (byte)255: (byte)0;
maskPixels[idx].r = burnAge[idx].r;
maskPixels[idx].g = burnAge[idx].g;
maskPixels[idx].b = burnAge[idx].b;
maskPixels[idx].a = solid;
float step = burnDecay * Time.deltaTime;
burnAge[idx].r = (byte)(burnAge[idx].r > step ? burnAge[idx].r - step : 0);
burnAge[idx].g = (byte)(burnAge[idx].g > step ? burnAge[idx].g - step : 0);
burnAge[idx].b = (byte)(burnAge[idx].b > step ? burnAge[idx].b - step : 0);
}
}
maskTex.SetPixels32(maskPixels);
maskTex.Apply(false);
DoStuffOnVisualUpdate?.Invoke();
}
//fucntions for changing mask:
public void DestroyMask(Destruction d, int cx, int cy)
{
d.ApplyDestruction(cx,cy,visualMask,stepX,stepY,maskWidth,maskHeight,burnAge,burnTime);
SetDirty();
}
public void SyncToVisual(bool[,] mask, int mWidth, int mHeight)
{
float stepX = (float)maskWidth/mWidth;
float stepY = (float)maskHeight/mHeight;
for(int i = 0; i < mWidth; i++)
{
for(int j = 0; j< mHeight; j++)
{
int x = (int)(i * stepX);
int y = (int)(j * stepY);
if(x < 0||y<0||x>=maskWidth||y>=maskHeight) continue;
mask[i,j] = visualMask[x,y];
}
}
}
public void Split(bool[,]mask, int mWidth, int mHeight, bool chunk = false)
{
float stepX = (float)maskWidth/mWidth;
float stepY = (float)maskHeight/mHeight;
for(int i = 0; i< maskWidth; i++)
{
for(int j = 0; j < maskHeight; j++)
{
int x = (int)(i / stepX);
int y = (int)(j / stepY);
if(x < 0||y<0||x>=mWidth||y>=mHeight) continue;
if(!chunk){
if (!visualMask[i, j])
continue;
bool keep = false;
for (int dy = -1; dy <= 1 && !keep; dy++)
{
for (int dx = -1; dx <= 1 && !keep; dx++)
{
int nx = x + dx;
int ny = y + dy;
if (nx < 0 || ny < 0 || nx >= mWidth || ny >= mHeight)
continue;
if (mask[nx, ny])
keep = true;
}
}
visualMask[i, j] = keep;
}
else
{
visualMask[i,j] = mask[x,y];
}
}
}
SetDirty();
ApplyMaskToTexture();
}
public void InheritBurn(PixelHandler pother)
{
pother.burnAge = burnAge.ToArray();
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0cd2b8cdc7d724d4fa15c58096ef8cc3
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Core/Main/PixelHandler.cs
uploadId: 925032
@@ -0,0 +1,245 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace KD.Destro2D{
[RequireComponent(typeof(PixelHandler))]
public class SplitHandler : MonoBehaviour
{
public int maskWidth = 64;
public int maskHeight = 64;
public int minCount = 8;
public float splitMass = 1;
public GameObject anchor;
public Vector2 chunkCentre{get; private set;}
public bool HasInit()=>init;
public int MaxChunkCount = 4;
bool[,] splitMask;
PixelHandler pHandler;
SpriteRenderer sprend;
Color[] rectPixels;
float stepX;
float stepY;
List<List<(int,int)>> regions = new();
bool init = false;
bool generatingChunks = false;
public Action OnAnchorBroken;
bool flag = true;
Texture2D runtimeTex;
public Queue<GameObject> splitChunks{get; private set;} = new();
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void InitialiseSplit()//initialise only after pixel handler initialises
{
if(HasInit()) return;
pHandler = GetComponent<PixelHandler>();
sprend = GetComponent<SpriteRenderer>();
if (!pHandler.HasInit())
{
Debug.LogWarning("Has not initialised visuals before splitter! Quitting.");
return;
}
rectPixels = pHandler.rectPixels;
runtimeTex = pHandler.runtimeTex;
int texWidth = sprend.sprite.texture.width;
int texHeight = sprend.sprite.texture.height;
stepX = (float)texWidth/maskWidth;
stepY = (float)texHeight/maskHeight;
BuildSplitMask(texWidth,texHeight);
pHandler.SyncToVisual(splitMask,maskWidth,maskHeight);
GetRegions();
pHandler.DoStuffOnVisualUpdate+=CheckDisconnected;
init = true;
}
void CheckDisconnected()
{
if(generatingChunks) return;
pHandler.SyncToVisual(splitMask,maskWidth,maskHeight);
GetRegions();
}
void GetRegions()
{
regions.Clear();
bool[,] visited = new bool[maskWidth,maskHeight];
var (ax, ay) = PlaceAnchor();
FloodFill(ax,ay,visited);//get anchored base to get relative split chunks(object doesn't have to be anchored, though)
for(int i = 0; i < maskWidth; i++)
{
for(int j = 0; j < maskHeight; j++)
{
if(!splitMask[i,j] || visited[i,j])
continue;
List<(int,int)> splitRegion = new();
FloodFill(i, j, visited, splitRegion);
if(splitRegion.Count >= minCount)
regions.Add(splitRegion);
}
}
GenerateChunks();
}
void BuildSplitMask(int texwidth, int texheight)
{
splitMask = new bool[maskWidth, maskHeight];
for(int i = 0; i < maskWidth; i++)
{
for(int j = 0; j < maskHeight; j++)
{
int px = (int)(i * stepX);
int py = (int)(j * stepY);
if(px < 0||py<0||px>=texwidth||py>=texheight) continue;
splitMask[i,j] = rectPixels[py * texwidth + px].a > 0.1f;
}
}
}
void FloodFill(int startX, int startY, bool[,] visited, List<(int,int)> region = null)
{
Stack<(int x, int y)> stack = new();
stack.Push((startX, startY));
while (stack.Count > 0)
{
var (x,y) = stack.Pop();
if(x < 0 || y < 0|| x >= maskWidth || y >= maskHeight)
continue;
if(!splitMask[x,y]) continue;
if(visited[x,y]) continue;
visited[x,y] = true;
region?.Add((x,y));
stack.Push((x+1,y));
stack.Push((x-1,y));
stack.Push((x,y+1));
stack.Push((x,y-1));
}
}
(int,int) PlaceAnchor()
{
if (anchor)
{
Vector2 locPos = transform.InverseTransformPoint(anchor.transform.position);
var (ax, ay) = Destruction.LocToPixel(locPos,sprend);
ax = Mathf.FloorToInt(ax/stepX);
ay = Mathf.FloorToInt(ay/stepY);
if(ax >= 0 && ay >= 0 && ax < maskWidth && ay < maskHeight)
{
if(splitMask[ax,ay])
return (ax,ay);
}
}
//if no anchor, call event ONCE, then default to first visible pixel
if (flag)
{
OnAnchorBroken?.Invoke();
flag = false;
}
for (int i = 0; i < maskWidth; i++)
{
for (int j = 0; j < maskHeight; j++)
{
if (splitMask[i, j])
{
return (i,j);
}
}
}
//if no visible pixel, Destroy and remove from list
if (Destruction.chunks.Contains(this.gameObject))
{
Destruction.chunks.Remove(this.gameObject);
}
Destroy(this.gameObject);
return (-1,-1);
}
void GenerateChunks()
{
generatingChunks = true;
foreach(var region in regions)
{
int minLX = int.MaxValue, minLY = int.MaxValue;
int maxLX = int.MinValue, maxLY = int.MinValue;
bool[,] regMask = new bool[maskWidth,maskHeight];
foreach(var r in region)
{
int x = r.Item1;
int y = r.Item2;
regMask[x,y] = true;
splitMask[x,y] = false;
minLX = Mathf.Min(minLX, x);
minLY = Mathf.Min(minLY, y);
maxLX = Mathf.Max(maxLX, x);
maxLY = Mathf.Max(maxLY, y);
}
//Updating Parent visual
pHandler.Split(splitMask,maskWidth,maskHeight);
//Chunk stuff, here u can make it inherit stuff as u want (by default it doesnt inherit mask details)
GameObject chunk = new GameObject("Split Chunk");
//if queue count is greater than max, cycle
if(splitChunks.Count >= MaxChunkCount)
{
if(splitChunks.TryDequeue(out GameObject g)){
Destruction.chunks.Remove(g);
Destroy(g);
}
}
splitChunks.Enqueue(chunk);
Destruction.chunks.Add(chunk);
SpriteRenderer sr = chunk.AddComponent<SpriteRenderer>();
sr.sprite = sprend.sprite;
sr.color = sprend.color;
chunk.transform.position = transform.position;
chunk.transform.localScale = transform.localScale;
chunk.transform.rotation = transform.rotation;
Rigidbody2D rb = chunk.AddComponent<Rigidbody2D>();
rb.mass = splitMass;
chunk.AddComponent<PolygonCollider2D>();
PixelHandler p = chunk.AddComponent<PixelHandler>();
p.maskerMaterial = pHandler.maskerMaterial;
p.Initialise(rectPixels,runtimeTex,true);
p.Split(regMask,maskWidth,maskHeight,true);
pHandler.InheritBurn(p);
var c = chunk.AddComponent<CollisionHandler>();
c.InitialiseCollision();
Vector2 minPos = c.GetPosOnDifferent(minLX,minLY,maskWidth,maskHeight);
Vector2 maxPos = c.GetPosOnDifferent(maxLX,maxLY,maskWidth,maskHeight);
var s = chunk.AddComponent<SplitHandler>();
s.splitMass = splitMass;
s.InitialiseSplit();
s.chunkCentre = (minPos + maxPos)/2f;
Destro2DMain d = chunk.AddComponent<Destro2DMain>();
//This part decides what destruction the chunk is susceptible to
d.InheritDestruction(this.gameObject);
}
generatingChunks = false;
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 6bbfd1860c521b44294e75917251fdba
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Core/Main/SplitHandler.cs
uploadId: 925032
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a1e240687cec8e344a5887fcc691c597
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 66b41cffe7db8a34bb54cec9fb3fbad5
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Demo1.unity
uploadId: 925032
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 7c59e07fecbb6c142982d20c977bc4e5
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Demo2.unity
uploadId: 925032
+912
View File
@@ -0,0 +1,912 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!29 &1
OcclusionCullingSettings:
m_ObjectHideFlags: 0
serializedVersion: 2
m_OcclusionBakeSettings:
smallestOccluder: 5
smallestHole: 0.25
backfaceThreshold: 100
m_SceneGUID: 00000000000000000000000000000000
m_OcclusionCullingData: {fileID: 0}
--- !u!104 &2
RenderSettings:
m_ObjectHideFlags: 0
serializedVersion: 10
m_Fog: 0
m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1}
m_FogMode: 3
m_FogDensity: 0.01
m_LinearFogStart: 0
m_LinearFogEnd: 300
m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1}
m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1}
m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1}
m_AmbientIntensity: 1
m_AmbientMode: 3
m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1}
m_SkyboxMaterial: {fileID: 0}
m_HaloStrength: 0.5
m_FlareStrength: 1
m_FlareFadeSpeed: 3
m_HaloTexture: {fileID: 0}
m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0}
m_DefaultReflectionMode: 0
m_DefaultReflectionResolution: 128
m_ReflectionBounces: 1
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 13
m_BakeOnSceneLoad: 0
m_GISettings:
serializedVersion: 2
m_BounceScale: 1
m_IndirectOutputScale: 1
m_AlbedoBoost: 1
m_EnvironmentLightingMode: 0
m_EnableBakedLightmaps: 0
m_EnableRealtimeLightmaps: 0
m_LightmapEditorSettings:
serializedVersion: 12
m_Resolution: 2
m_BakeResolution: 40
m_AtlasSize: 1024
m_AO: 0
m_AOMaxDistance: 1
m_CompAOExponent: 1
m_CompAOExponentDirect: 0
m_ExtractAmbientOcclusion: 0
m_Padding: 2
m_LightmapParameters: {fileID: 0}
m_LightmapsBakeMode: 1
m_TextureCompression: 1
m_ReflectionCompression: 2
m_MixedBakeMode: 2
m_BakeBackend: 2
m_PVRSampling: 1
m_PVRDirectSampleCount: 32
m_PVRSampleCount: 512
m_PVRBounces: 2
m_PVREnvironmentSampleCount: 256
m_PVREnvironmentReferencePointCount: 2048
m_PVRFilteringMode: 1
m_PVRDenoiserTypeDirect: 1
m_PVRDenoiserTypeIndirect: 1
m_PVRDenoiserTypeAO: 1
m_PVRFilterTypeDirect: 0
m_PVRFilterTypeIndirect: 0
m_PVRFilterTypeAO: 0
m_PVREnvironmentMIS: 1
m_PVRCulling: 1
m_PVRFilteringGaussRadiusDirect: 1
m_PVRFilteringGaussRadiusIndirect: 1
m_PVRFilteringGaussRadiusAO: 1
m_PVRFilteringAtrousPositionSigmaDirect: 0.5
m_PVRFilteringAtrousPositionSigmaIndirect: 2
m_PVRFilteringAtrousPositionSigmaAO: 1
m_ExportTrainingData: 0
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 20201, guid: 0000000000000000f000000000000000, type: 0}
m_LightingSettings: {fileID: 0}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
m_ObjectHideFlags: 0
m_BuildSettings:
serializedVersion: 3
agentTypeID: 0
agentRadius: 0.5
agentHeight: 2
agentSlope: 45
agentClimb: 0.4
ledgeDropHeight: 0
maxJumpAcrossDistance: 0
minRegionArea: 2
manualCellSize: 0
cellSize: 0.16666667
manualTileSize: 0
tileSize: 256
buildHeightMesh: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
--- !u!1 &417878964
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 417878967}
- component: {fileID: 417878966}
- component: {fileID: 417878965}
- component: {fileID: 417878968}
m_Layer: 0
m_Name: Main Camera
m_TagString: MainCamera
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &417878965
AudioListener:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 417878964}
m_Enabled: 1
--- !u!20 &417878966
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 417878964}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_Iso: 200
m_ShutterSpeed: 0.005
m_Aperture: 16
m_FocusDistance: 10
m_FocalLength: 50
m_BladeCount: 5
m_Curvature: {x: 2, y: 11}
m_BarrelClipping: 0.25
m_Anamorphism: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 1
orthographic size: 5
m_Depth: -1
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!4 &417878967
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 417878964}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &417878968
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 417878964}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a79441f348de89743a2939f4d699eac1, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.UniversalAdditionalCameraData
m_RenderShadows: 1
m_RequiresDepthTextureOption: 2
m_RequiresOpaqueTextureOption: 2
m_CameraType: 0
m_Cameras: []
m_RendererIndex: -1
m_VolumeLayerMask:
serializedVersion: 2
m_Bits: 1
m_VolumeTrigger: {fileID: 0}
m_VolumeFrameworkUpdateModeOption: 2
m_RenderPostProcessing: 1
m_Antialiasing: 0
m_AntialiasingQuality: 2
m_StopNaN: 0
m_Dithering: 0
m_ClearDepth: 1
m_AllowXRRendering: 1
m_AllowHDROutput: 1
m_UseScreenCoordOverride: 0
m_ScreenSizeOverride: {x: 0, y: 0, z: 0, w: 0}
m_ScreenCoordScaleBias: {x: 0, y: 0, z: 0, w: 0}
m_RequiresDepthTexture: 0
m_RequiresColorTexture: 0
m_TaaSettings:
m_Quality: 3
m_FrameInfluence: 0.1
m_JitterScale: 1
m_MipBias: 0
m_VarianceClampScale: 0.9
m_ContrastAdaptiveSharpening: 0
m_Version: 2
--- !u!1001 &1239845809
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: -2433130749055134419, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: destructionObject
value:
objectReference: {fileID: 7855870090563428193, guid: d52a58b623472274b9eb4ff5d238884d, type: 3}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalPosition.x
value: -1.29157
objectReference: {fileID: 0}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalPosition.y
value: -0.45274
objectReference: {fileID: 0}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2434464229564482278, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7590715798397098495, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
propertyPath: m_Name
value: DestructionSpawner
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 8bdfa8b2b68b4a844b7420b44c6ea72a, type: 3}
--- !u!1 &1417426023
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1417426030}
- component: {fileID: 1417426029}
- component: {fileID: 1417426028}
- component: {fileID: 1417426027}
- component: {fileID: 1417426026}
- component: {fileID: 1417426025}
- component: {fileID: 1417426031}
m_Layer: 0
m_Name: Ball_0
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1417426025
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1417426023}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6bbfd1860c521b44294e75917251fdba, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::SplitHandler
maskWidth: 64
maskHeight: 64
minCount: 8
anchor: {fileID: 0}
--- !u!114 &1417426026
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1417426023}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a6483c7bdbae77c4186cbd3b87097918, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::CollisionHandler
maskWidth: 64
maskHeight: 64
--- !u!60 &1417426027
PolygonCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1417426023}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 3.31, y: 3.87}
newSize: {x: 3.31, y: 3.87}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Points:
m_Paths:
- - {x: 0.745, y: -1.8149999}
- {x: 0.765, y: -1.745}
- {x: 0.875, y: -1.735}
- {x: 0.955, y: -1.675}
- {x: 1.3149999, y: -1.345}
- {x: 1.405, y: -1.245}
- {x: 1.535, y: -1.025}
- {x: 1.5949999, y: -0.805}
- {x: 1.655, y: -0.445}
- {x: 1.655, y: -0.295}
- {x: 1.605, y: -0.285}
- {x: 1.605, y: 0.114999995}
- {x: 1.535, y: 0.13499999}
- {x: 1.525, y: 0.315}
- {x: 1.4649999, y: 0.39499998}
- {x: 1.385, y: 0.525}
- {x: 1.3249999, y: 0.60499996}
- {x: 1.255, y: 0.685}
- {x: 1.185, y: 0.745}
- {x: 0.885, y: 1.045}
- {x: 0.60499996, y: 1.175}
- {x: 0.315, y: 1.245}
- {x: 0.125, y: 1.245}
- {x: 0.125, y: 1.925}
- {x: 0.114999995, y: 1.935}
- {x: -0.145, y: 1.935}
- {x: -0.195, y: 1.885}
- {x: -0.195, y: 1.255}
- {x: -0.325, y: 1.255}
- {x: -0.345, y: 1.185}
- {x: -0.60499996, y: 1.185}
- {x: -0.625, y: 1.115}
- {x: -0.745, y: 1.115}
- {x: -0.765, y: 1.045}
- {x: -0.885, y: 1.045}
- {x: -0.965, y: 0.97499996}
- {x: -1.255, y: 0.675}
- {x: -1.405, y: 0.545}
- {x: -1.515, y: 0.345}
- {x: -1.5949999, y: 0.105}
- {x: -1.655, y: -0.255}
- {x: -1.655, y: -0.405}
- {x: -1.605, y: -0.415}
- {x: -1.605, y: -0.815}
- {x: -1.535, y: -0.835}
- {x: -1.535, y: -1.025}
- {x: -1.475, y: -1.105}
- {x: -1.395, y: -1.115}
- {x: -1.395, y: -1.235}
- {x: -1.165, y: -1.4649999}
- {x: -1.055, y: -1.5849999}
- {x: -0.885, y: -1.745}
- {x: -0.60499996, y: -1.875}
- {x: -0.355, y: -1.935}
- {x: 0.33499998, y: -1.935}
- {x: 0.345, y: -1.885}
- {x: 0.60499996, y: -1.885}
- {x: 0.625, y: -1.8149999}
m_UseDelaunayMesh: 1
--- !u!114 &1417426028
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1417426023}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0cd2b8cdc7d724d4fa15c58096ef8cc3, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::PixelHandler
maskerMaterial: {fileID: 2100000, guid: 7699106345509f94480357cb33eeed94, type: 2}
maskWidth: 128
maskHeight: 128
burnDecay: 1
burnTime: 5
--- !u!212 &1417426029
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1417426023}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Sprite: {fileID: -3919779002189068522, guid: 397ead3a8bdeb4840bb3d4f60eeef7cd, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 3.31, y: 3.87}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!4 &1417426030
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1417426023}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.079902, y: 0.27500027, z: 0}
m_LocalScale: {x: 1.2404, y: 1.2404, z: 1.2404}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1417426031
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1417426023}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3ead6d33feb996340b43f15ce524b4e7, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::KD.Destro2D.Destro2DMain
destructionList: []
references:
version: 2
RefIds: []
--- !u!1 &1710909871
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1710909875}
- component: {fileID: 1710909874}
- component: {fileID: 1710909873}
- component: {fileID: 1710909872}
m_Layer: 0
m_Name: Static Sprite
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!50 &1710909872
Rigidbody2D:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1710909871}
m_BodyType: 2
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDamping: 0
m_AngularDamping: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!61 &1710909873
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1710909871}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 0, y: 0}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0.5, y: 0.5}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0
--- !u!212 &1710909874
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1710909871}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Sprite: {fileID: 7482667652216324306, guid: 311925a002f4447b3a28927169b83ea6, type: 3}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!4 &1710909875
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1710909871}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.27, y: -4.85, z: 0}
m_LocalScale: {x: 22.96, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1973567085
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1973567087}
- component: {fileID: 1973567086}
m_Layer: 0
m_Name: Global Volume
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!114 &1973567086
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1973567085}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 172515602e62fb746b5d573b38a5fe58, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Core.Runtime::UnityEngine.Rendering.Volume
m_IsGlobal: 1
priority: 0
blendDistance: 0
weight: 1
sharedProfile: {fileID: 11400000, guid: ec7ce02d54251004b8f0c9d303392d59, type: 2}
--- !u!4 &1973567087
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1973567085}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -1.291575, y: -0.45274207, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2102487243
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2102487246}
- component: {fileID: 2102487245}
- component: {fileID: 2102487244}
m_Layer: 0
m_Name: New Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!102 &2102487244
TextMesh:
serializedVersion: 3
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2102487243}
m_Text: Explode(Heavy)
m_OffsetZ: 0
m_CharacterSize: 1
m_LineSpacing: 1
m_Anchor: 0
m_Alignment: 0
m_TabSize: 4
m_FontSize: 72
m_FontStyle: 0
m_RichText: 1
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_Color:
serializedVersion: 2
rgba: 4294967295
--- !u!23 &2102487245
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2102487243}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10100, guid: 0000000000000000e000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!4 &2102487246
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2102487243}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -3.53, y: 4.71, z: 0}
m_LocalScale: {x: 0.21079859, y: 0.21079859, z: 0.21079859}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1660057539 &9223372036854775807
SceneRoots:
m_ObjectHideFlags: 0
m_Roots:
- {fileID: 417878967}
- {fileID: 1417426030}
- {fileID: 1710909875}
- {fileID: 1239845809}
- {fileID: 1973567087}
- {fileID: 2102487246}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 65431662eb4cb6a4ab916b7d3010cdc3
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Demo3.unity
uploadId: 925032
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 2f08182301bf9fd4e852bffbea792b93
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Demo4.unity
uploadId: 925032
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: eef684bd685957841827c94facca9b62
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

@@ -0,0 +1,150 @@
fileFormatVersion: 2
guid: 397ead3a8bdeb4840bb3d4f60eeef7cd
TextureImporter:
internalIDToNameTable:
- first:
213: -3919779002189068522
second: Ball_0
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: Ball_0
rect:
serializedVersion: 2
x: 188
y: 216
width: 331
height: 387
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 6174c70f3c52a99c0800000000000000
internalID: -3919779002189068522
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
Ball_0: -3919779002189068522
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Ball.png
uploadId: 925032
@@ -0,0 +1,60 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7855870090563428193
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7439239760865237611}
- component: {fileID: 5145447518351745437}
m_Layer: 0
m_Name: BasicDestructor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7439239760865237611
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7855870090563428193}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.16896, y: 0.76936, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &5145447518351745437
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7855870090563428193}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 468637d39f5b1c444a55bf2202d62fa9, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::DoBasicDestruction
destructions:
- rid: 3436372252625731655
burncolors:
- {r: 0.08317256, g: 1, b: 0, a: 0}
radius: 2
doMainDestruction: 1
references:
version: 2
RefIds:
- rid: 3436372252625731655
type: {class: EllipseDestruction, ns: KD.Destro2D, asm: Assembly-CSharp}
data:
rx: 0.2
ry: 0.2
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: f8112ec97b227c54795dcea9b207f570
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/BasicDestructor.prefab
uploadId: 925032
@@ -0,0 +1,174 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &530599505796992095
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 886641560740339179}
- component: {fileID: 2900268591357580870}
- component: {fileID: -7234616792653190795}
- component: {fileID: -7870813918204110873}
- component: {fileID: 6539394414511648509}
m_Layer: 0
m_Name: Bullet
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &886641560740339179
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &2900268591357580870
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Sprite: {fileID: -3188702180127858350, guid: d6a95ec3b675f564784ddbec851ba024, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.47, y: 0.2}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!50 &-7234616792653190795
Rigidbody2D:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDamping: 0
m_AngularDamping: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 1
m_Constraints: 0
--- !u!70 &-7870813918204110873
CapsuleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 0, y: 0}
m_Size: {x: 0.47, y: 0.2}
m_Direction: 1
--- !u!114 &6539394414511648509
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0bc49a307487e054ea6a29c582421a68, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::BasicMissile
DestructionObject: {fileID: 7855870090563428193, guid: f8112ec97b227c54795dcea9b207f570, type: 3}
effect: {fileID: 1869709638367569120, guid: 3fa4f1f7b4ada0449a8d78f38e8847e0, type: 3}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 1e1bb5cc8442a9744b8e62c93f779393
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Bullet.prefab
uploadId: 925032
@@ -0,0 +1,97 @@
{
"version": 1,
"name": "DemoAction",
"maps": [
{
"name": "Player",
"id": "8f89b2d8-3063-47aa-881a-0465dbf0ea8d",
"actions": [
{
"name": "Attack",
"type": "Button",
"id": "b717d210-5347-4e82-adf1-6a9b5ceebaa0",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
},
{
"name": "Move",
"type": "Value",
"id": "0cc69cdb-3cc5-476f-88a0-8f032ca76dda",
"expectedControlType": "Axis",
"processors": "",
"interactions": "",
"initialStateCheck": true
},
{
"name": "AltAttack",
"type": "Button",
"id": "8f05f2c5-ea2c-4b74-b7a0-4494b28a308b",
"expectedControlType": "",
"processors": "",
"interactions": "",
"initialStateCheck": false
}
],
"bindings": [
{
"name": "",
"id": "68f88d78-a7ff-4af1-8fad-55fa8064b5ef",
"path": "<Mouse>/leftButton",
"interactions": "",
"processors": "",
"groups": "",
"action": "Attack",
"isComposite": false,
"isPartOfComposite": false
},
{
"name": "1D Axis",
"id": "2ba5d915-a551-49d2-8684-f3135b665e87",
"path": "1DAxis",
"interactions": "",
"processors": "",
"groups": "",
"action": "Move",
"isComposite": true,
"isPartOfComposite": false
},
{
"name": "negative",
"id": "5e198b03-26e9-4490-b449-3568cac362d4",
"path": "<Keyboard>/a",
"interactions": "",
"processors": "",
"groups": "",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "positive",
"id": "a0d48054-a86d-4671-a929-d018ffc2b7b7",
"path": "<Keyboard>/d",
"interactions": "",
"processors": "",
"groups": "",
"action": "Move",
"isComposite": false,
"isPartOfComposite": true
},
{
"name": "",
"id": "42d65e7a-9661-40bb-aaac-6bae9adb2fe2",
"path": "<Mouse>/rightButton",
"interactions": "",
"processors": "",
"groups": "",
"action": "AltAttack",
"isComposite": false,
"isPartOfComposite": false
}
]
}
],
"controlSchemes": []
}
@@ -0,0 +1,21 @@
fileFormatVersion: 2
guid: f7f68c548fa32664fabe6698f315f2c4
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 8404be70184654265930450def6a9037, type: 3}
generateWrapperCode: 0
wrapperCodePath:
wrapperClassName:
wrapperCodeNamespace:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/DemoAction.inputactions
uploadId: 925032
@@ -0,0 +1,49 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7590715798397098495
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2434464229564482278}
- component: {fileID: -2433130749055134419}
m_Layer: 0
m_Name: DestructionSpawner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2434464229564482278
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7590715798397098495}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.16896, y: 0.76936, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-2433130749055134419
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7590715798397098495}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a1f4491c42c8e4741a70502de1fcf00c, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::SpawnDestruction
inputActions: {fileID: -944628639613478452, guid: f7f68c548fa32664fabe6698f315f2c4, type: 3}
interval: 0.1
destructionObject: {fileID: 7855870090563428193, guid: f8112ec97b227c54795dcea9b207f570, type: 3}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 8bdfa8b2b68b4a844b7420b44c6ea72a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/DestructionSpawner.prefab
uploadId: 925032
@@ -0,0 +1,51 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7855870090563428193
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7439239760865237611}
- component: {fileID: 1048381226204125407}
m_Layer: 0
m_Name: Exploder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7439239760865237611
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7855870090563428193}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.16896, y: 0.76936, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1048381226204125407
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7855870090563428193}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 7f890bf06646f284484b476fbe1d0331, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::DoExplosion
radiusCore: 0
radiusOuter: 3
noiseScale: 20
thickness: 0.07
force: 100
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: d52a58b623472274b9eb4ff5d238884d
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Exploder.prefab
uploadId: 925032
@@ -0,0 +1,47 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7855870090563428193
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7439239760865237611}
- component: {fileID: 7841401897182955673}
m_Layer: 0
m_Name: GrowingDestructor
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7439239760865237611
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7855870090563428193}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.16896, y: 0.76936, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7841401897182955673
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7855870090563428193}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5857f8bde12c0bc4c95d504a77507c78, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::DoGrowingDestruction
radius: 1
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 757de081bdb8f18489c03cf70b366975
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/GrowingDestructor.prefab
uploadId: 925032
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 3fa4f1f7b4ada0449a8d78f38e8847e0
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/HitEffect.prefab
uploadId: 925032
@@ -0,0 +1,80 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: MaskMat
m_Shader: {fileID: -6465566751694194690, guid: adcc15677e1b6b04686415d0e2eaf7d6, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BurnWidth: 1.02
- _EnableExternalAlpha: 0
- _Intensity: 5
- _ZWrite: 0
m_Colors:
- White: {r: 1, g: 1, b: 1, a: 1}
- _BurnColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _MaskTexelSize: {r: 0, g: 0, b: 0, a: 0}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &2215592077570948275
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 7699106345509f94480357cb33eeed94
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/MaskMat.mat
uploadId: 925032
@@ -0,0 +1,80 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-3566463999401479759
MonoBehaviour:
m_ObjectHideFlags: 11
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Editor::UnityEditor.Rendering.Universal.AssetVersion
version: 10
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: MaskMat2
m_Shader: {fileID: -6465566751694194690, guid: adcc15677e1b6b04686415d0e2eaf7d6, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _AlphaTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MaskTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _NormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BurnWidth: 1.7
- _EnableExternalAlpha: 0
- _Intensity: 5
- _ZWrite: 0
m_Colors:
- White: {r: 1, g: 1, b: 1, a: 1}
- _BurnColor: {r: 0, g: 0.9202986, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _MaskTexelSize: {r: 0, g: 0, b: 0, a: 0}
- _RendererColor: {r: 1, g: 1, b: 1, a: 1}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: 32f5ed651f9a8074dab13dbee8e89f6c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/MaskMat2.mat
uploadId: 925032
Binary file not shown.

After

Width:  |  Height:  |  Size: 833 B

@@ -0,0 +1,150 @@
fileFormatVersion: 2
guid: d6a95ec3b675f564784ddbec851ba024
TextureImporter:
internalIDToNameTable:
- first:
213: -3188702180127858350
second: pixil-frame-0 (8)_0
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: pixil-frame-0 (8)_0
rect:
serializedVersion: 2
x: 17
y: 54
width: 47
height: 20
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 25127faf2447fb3d0800000000000000
internalID: -3188702180127858350
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
pixil-frame-0 (8)_0: -3188702180127858350
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/MissileSprite.png
uploadId: 925032
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 00190bdca6406df4486128f81923e945
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,30 @@
using UnityEngine;
namespace KD.Destro2D{
public class BasicMissile : MonoBehaviour
{
public GameObject DestructionObject;
public GameObject effect;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
Destroy(this.gameObject,4f);
}
// Update is called once per frame
void Update()
{
}
void OnCollisionEnter2D(Collision2D collision)
{
Vector2 hitPoint = collision.contacts[0].point;
if(this!= null){
Instantiate(DestructionObject,hitPoint,Quaternion.identity);
Instantiate(effect,hitPoint,Quaternion.identity);
Destroy(this.gameObject);
}
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 0bc49a307487e054ea6a29c582421a68
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Scripts/BasicMissile.cs
uploadId: 925032
@@ -0,0 +1,82 @@
using UnityEngine;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif
namespace KD.Destro2D{
public class BasicPlayerControl2D : MonoBehaviour
{
#if ENABLE_INPUT_SYSTEM
public InputActionAsset inputActions;
public float bulletCD;
InputAction move;
InputAction missileAttack;
InputAction bulletAttack;
Rigidbody2D rb;
public float speed;
Vector2 lookDirn;
Vector2 dirn;
public GameObject missilePrefab;
public GameObject bulletPrefab;
public float missileSpeed;
public float shootOffset;
float t;
void OnEnable()
{
move = inputActions.FindAction("Player/Move",true);
missileAttack = inputActions.FindAction("Player/AltAttack",true);
bulletAttack = inputActions.FindAction("Player/Attack",true);
missileAttack.Enable();
bulletAttack.Enable();
move.Enable();
rb = GetComponent<Rigidbody2D>();
}
void Start()
{
missileAttack.performed += _ => ShootMissile(missilePrefab);
}
void OnDisable()
{
missileAttack.Disable();
bulletAttack.Disable();
move.Disable();
}
// Update is called once per frame
void Update()
{
t+=Time.deltaTime;
Move();
Look();
if(bulletAttack.IsPressed()){
if(t < bulletCD) return;
ShootMissile(bulletPrefab);
t = 0;
}
}
void FixedUpdate()
{
rb.AddForce(dirn);
}
void ShootMissile(GameObject prefab)
{
float angle = Mathf.Atan2(lookDirn.y,lookDirn.x) * Mathf.Rad2Deg;
Quaternion missileRotn = Quaternion.AngleAxis(angle,transform.forward);
Rigidbody2D missile = Instantiate(prefab,(Vector2)transform.position + lookDirn.normalized * shootOffset,missileRotn).GetComponent<Rigidbody2D>();
missile.AddForce(lookDirn.normalized * missileSpeed);
}
void Look()
{
Vector3 mousePos = Camera.main.ScreenToWorldPoint(Mouse.current.position.ReadValue());
mousePos.z = transform.position.z;
lookDirn = mousePos - transform.position;
}
void Move()
{
float dirval = move.ReadValue<float>();
dirn = transform.right * dirval * speed;
}
#endif
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 320edd842814fe243b374e3ff7854d70
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Scripts/BasicPlayerControl2D.cs
uploadId: 925032
@@ -0,0 +1,22 @@
using UnityEngine;
namespace KD.Destro2D{
public class BasicPlayerFollow : MonoBehaviour
{
public Transform player;
public float dist = -10;
public float offsetY = 2;
public float speed = 5;
void Start()
{
}
// Update is called once per frame
void LateUpdate()
{
Vector3 targetpos = new Vector3(player.position.x,player.position.y + offsetY,dist);
transform.position = Vector3.Lerp(transform.position,targetpos,speed * Time.deltaTime);
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b50307b24efad1f4d8ca6963b3453c0d
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Scripts/BasicPlayerFollow.cs
uploadId: 925032
@@ -0,0 +1,36 @@
using System.Collections.Generic;
using UnityEngine;
namespace KD.Destro2D{
public class DoBasicDestruction : MonoBehaviour
{
[SerializeReference]
public List<Destruction> destructions = new();
[Header("Burn colors correspond to destructions in order, make sure to have SAME COUNT")]
public List<Color> burncolors = new();
public float radius = 1f;
public bool doMainDestruction = false;
void OnEnable()
{
Collider2D[] col = Physics2D.OverlapCircleAll(transform.position,radius);
foreach(Collider2D c in col)
{
if(c.TryGetComponent<Destro2DMain>(out var d)){
//important to setup when dealing with other object
for(int i = 0; i < destructions.Count; i++)
{
var dest = destructions[i];
var color = burncolors[i];
dest.SetupWithColor(c.gameObject,color);
}
d.DynamicDestroyWorld(transform.position,destructions);
if(doMainDestruction) d.DynamicDestroyWorld(transform.position);
}
}
Destroy(this.gameObject);
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 468637d39f5b1c444a55bf2202d62fa9
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Scripts/DoBasicDestruction.cs
uploadId: 925032
@@ -0,0 +1,42 @@
using System.Collections;
using UnityEngine;
namespace KD.Destro2D{
public class DoExplosion : MonoBehaviour
{
public float radiusCore = 0f;
public float radiusOuter = 1f;
public float noiseScale = 20f;
public float thickness = 0.12f;
public float force = 100f;
void OnEnable()
{
Collider2D[] col = Physics2D.OverlapCircleAll(transform.position,radiusOuter);
foreach(Collider2D c in col)
{
if(c.TryGetComponent<Destro2DMain>(out var d)){
d.DynamicFracture(transform.position,radiusCore,radiusOuter,noiseScale,thickness,5);
}
}
StartCoroutine(AddForce());
}
IEnumerator AddForce()
{
//delay for the chunks to actually split
yield return new WaitForSeconds(0.1f);
//detect again, then add force
Collider2D[] col = Physics2D.OverlapCircleAll(transform.position,radiusOuter);
foreach(Collider2D c in col)
{
if(c.TryGetComponent<SplitHandler>(out var s) && c.TryGetComponent<Rigidbody2D>(out var rb))
{
Vector2 worldChunkCentre = c.transform.TransformPoint(s.chunkCentre);
Vector2 dir = worldChunkCentre - (Vector2)transform.position;
rb.AddForce(dir.normalized * force);
}
}
Destroy(this.gameObject);
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 7f890bf06646f284484b476fbe1d0331
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Scripts/DoExplosion.cs
uploadId: 925032
@@ -0,0 +1,21 @@
using UnityEngine;
namespace KD.Destro2D{
public class DoGrowingDestruction : MonoBehaviour
{
public float radius = 1f;
void OnEnable()
{
Collider2D[] col = Physics2D.OverlapCircleAll(transform.position,radius);
foreach(Collider2D c in col)
{
if(c.TryGetComponent<Destro2DMain>(out var d)){
d.DynamicDestroyWorld(c.ClosestPoint(transform.position));
}
}
Destroy(this.gameObject);
}
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 5857f8bde12c0bc4c95d504a77507c78
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Scripts/DoGrowingDestruction.cs
uploadId: 925032
@@ -0,0 +1,55 @@
using System.Collections;
using UnityEngine;
#if ENABLE_INPUT_SYSTEM
using UnityEngine.InputSystem;
#endif
namespace KD.Destro2D{
public class SpawnDestruction : MonoBehaviour
{
#if ENABLE_INPUT_SYSTEM
public InputActionAsset inputActions;
public float interval = 0.1f;
public GameObject destructionObject;
InputAction click;
void OnEnable()
{
click = inputActions.FindAction("Player/Attack",true);
click.Enable();
}
void OnDisable()
{
click.Disable();
}
void Start()
{
StartCoroutine(SpawnDestructionObject(interval));
}
void Update()
{
}
IEnumerator SpawnDestructionObject(float interval)
{
while (true)
{
if(click.IsPressed()){
Vector2 mouseScreen = Mouse.current.position.ReadValue();
Vector3 mousepos = Camera.main.ScreenToWorldPoint(mouseScreen);
mousepos.z = 0f;
Instantiate(destructionObject,mousepos,Quaternion.identity);
}
yield return new WaitForSeconds(interval);
}
}
#endif
}
}
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a1f4491c42c8e4741a70502de1fcf00c
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/Scripts/SpawnDestruction.cs
uploadId: 925032
@@ -0,0 +1,174 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &530599505796992095
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 886641560740339179}
- component: {fileID: 2900268591357580870}
- component: {fileID: -7234616792653190795}
- component: {fileID: -7870813918204110873}
- component: {fileID: 6539394414511648509}
m_Layer: 0
m_Name: missile
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &886641560740339179
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 3, y: 3, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &2900268591357580870
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Sprite: {fileID: -3188702180127858350, guid: d6a95ec3b675f564784ddbec851ba024, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 0.47, y: 0.2}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!50 &-7234616792653190795
Rigidbody2D:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDamping: 0
m_AngularDamping: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 0
--- !u!70 &-7870813918204110873
CapsuleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 0, y: 0}
m_Size: {x: 0.47, y: 0.2}
m_Direction: 1
--- !u!114 &6539394414511648509
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 530599505796992095}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0bc49a307487e054ea6a29c582421a68, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::BasicMissile
DestructionObject: {fileID: 7855870090563428193, guid: d52a58b623472274b9eb4ff5d238884d, type: 3}
effect: {fileID: 1869709638367569120, guid: 3fa4f1f7b4ada0449a8d78f38e8847e0, type: 3}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: f88662fe367d6ec47931f6017fd517dd
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/missile.prefab
uploadId: 925032
@@ -0,0 +1,211 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4388428910080376379
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7512688636141990600}
- component: {fileID: 3679803014344814055}
- component: {fileID: 2495678324946077080}
- component: {fileID: 8750299775306253719}
- component: {fileID: 7506747786027612814}
m_Layer: 0
m_Name: player
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7512688636141990600
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388428910080376379}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5.93, y: -2.6, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 7368987377327588598}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &3679803014344814055
SpriteRenderer:
serializedVersion: 2
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388428910080376379}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RayTracingAccelStructBuildFlagsOverride: 0
m_RayTracingAccelStructBuildFlags: 1
m_SmallMeshCulling: 1
m_ForceMeshLod: -1
m_MeshLodSelectionBias: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_GlobalIlluminationMeshLod: 0
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_MaskInteraction: 0
m_Sprite: {fileID: -9095717837082945937, guid: 207ee8102dd4143d288186ef0be518ee, type: 3}
m_Color: {r: 0.4037736, g: 0.4037736, b: 0.4037736, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 2}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_SpriteSortPoint: 0
--- !u!70 &2495678324946077080
CapsuleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388428910080376379}
m_Enabled: 1
serializedVersion: 3
m_Density: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_ForceSendLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ForceReceiveLayers:
serializedVersion: 2
m_Bits: 4294967295
m_ContactCaptureLayers:
serializedVersion: 2
m_Bits: 4294967295
m_CallbackLayers:
serializedVersion: 2
m_Bits: 4294967295
m_IsTrigger: 0
m_UsedByEffector: 0
m_CompositeOperation: 0
m_CompositeOrder: 0
m_Offset: {x: 0, y: 0}
m_Size: {x: 1, y: 2}
m_Direction: 0
--- !u!50 &8750299775306253719
Rigidbody2D:
serializedVersion: 5
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388428910080376379}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 1
m_LinearDamping: 0
m_AngularDamping: 0.05
m_GravityScale: 1
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 4
--- !u!114 &7506747786027612814
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4388428910080376379}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 320edd842814fe243b374e3ff7854d70, type: 3}
m_Name:
m_EditorClassIdentifier: Assembly-CSharp::KD.Destro2D.BasicPlayerControl2D
inputActions: {fileID: -944628639613478452, guid: f7f68c548fa32664fabe6698f315f2c4, type: 3}
bulletCD: 0.1
speed: 10
missilePrefab: {fileID: 530599505796992095, guid: f88662fe367d6ec47931f6017fd517dd, type: 3}
bulletPrefab: {fileID: 530599505796992095, guid: 1e1bb5cc8442a9744b8e62c93f779393, type: 3}
missileSpeed: 700
shootOffset: 2
--- !u!1 &5131350801359744721
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7368987377327588598}
m_Layer: 0
m_Name: shootpoint
m_TagString: Untagged
m_Icon: {fileID: 5721338939258241955, guid: 0000000000000000d000000000000000, type: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7368987377327588598
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5131350801359744721}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 1.5, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7512688636141990600}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 531052c9804db454faf89008a4dd789b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/player.prefab
uploadId: 925032
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@@ -0,0 +1,150 @@
fileFormatVersion: 2
guid: dd8655b37b50b714d84ec5b13d909ff7
TextureImporter:
internalIDToNameTable:
- first:
213: -1333439504715762810
second: pixil-frame-0 (9)_0
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: pixil-frame-0 (9)_0
rect:
serializedVersion: 2
x: 26
y: 37
width: 30
height: 58
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 683b1f7d5dbae7de0800000000000000
internalID: -1333439504715762810
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
pixil-frame-0 (9)_0: -1333439504715762810
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/stalacite.png
uploadId: 925032
Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

@@ -0,0 +1,150 @@
fileFormatVersion: 2
guid: a68360ce2247edd40912f0be3acad948
TextureImporter:
internalIDToNameTable:
- first:
213: 2868539044483428322
second: wall_0
externalObjects: {}
serializedVersion: 13
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
flipGreenChannel: 0
isReadable: 1
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMipmapLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 2
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 100
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
swizzle: 50462976
cookieLightType: 0
platformSettings:
- serializedVersion: 4
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 4
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
ignorePlatformSupport: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites:
- serializedVersion: 2
name: wall_0
rect:
serializedVersion: 2
x: 279
y: 405
width: 800
height: 814
alignment: 0
pivot: {x: 0, y: 0}
border: {x: 0, y: 0, z: 0, w: 0}
customData:
outline: []
physicsShape: []
tessellationDetail: -1
bones: []
spriteID: 2efe5c210191fc720800000000000000
internalID: 2868539044483428322
vertices: []
indices:
edges: []
weights: []
outline: []
customData:
physicsShape: []
bones: []
spriteID:
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
spriteCustomMetadata:
entries: []
nameFileIdTable:
wall_0: 2868539044483428322
mipmapLimitGroupName:
pSDRemoveMatte: 0
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/Prefabs/wall.png
uploadId: 925032
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 29e62cac777d509488a6cba96de66ea3
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,95 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &-6883129740127128635
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 899c54efeace73346a0a16faa3afe726, type: 3}
m_Name: Vignette
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.Vignette
active: 1
color:
m_OverrideState: 1
m_Value: {r: 0, g: 0, b: 0, a: 1}
center:
m_OverrideState: 1
m_Value: {x: 0.5, y: 0.5}
intensity:
m_OverrideState: 1
m_Value: 0.426
smoothness:
m_OverrideState: 0
m_Value: 0.2
rounded:
m_OverrideState: 0
m_Value: 0
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d7fd9488000d3734a9e00ee676215985, type: 3}
m_Name: Global Volume Profile
m_EditorClassIdentifier: Unity.RenderPipelines.Core.Runtime::UnityEngine.Rendering.VolumeProfile
components:
- {fileID: 4433359248561049050}
- {fileID: -6883129740127128635}
--- !u!114 &4433359248561049050
MonoBehaviour:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0b2db86121404754db890f4c8dfe81b2, type: 3}
m_Name: Bloom
m_EditorClassIdentifier: Unity.RenderPipelines.Universal.Runtime::UnityEngine.Rendering.Universal.Bloom
active: 1
skipIterations:
m_OverrideState: 0
m_Value: 1
threshold:
m_OverrideState: 1
m_Value: 0.9
intensity:
m_OverrideState: 1
m_Value: 2
scatter:
m_OverrideState: 0
m_Value: 0.7
clamp:
m_OverrideState: 0
m_Value: 65472
tint:
m_OverrideState: 0
m_Value: {r: 1, g: 1, b: 1, a: 1}
highQualityFiltering:
m_OverrideState: 0
m_Value: 0
filter:
m_OverrideState: 0
m_Value: 0
downscale:
m_OverrideState: 0
m_Value: 0
maxIterations:
m_OverrideState: 0
m_Value: 6
dirtTexture:
m_OverrideState: 0
m_Value: {fileID: 0}
dimension: 1
dirtIntensity:
m_OverrideState: 0
m_Value: 0
@@ -0,0 +1,15 @@
fileFormatVersion: 2
guid: ec7ce02d54251004b8f0c9d303392d59
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Demos/volume/Global Volume Profile.asset
uploadId: 925032
Binary file not shown.
@@ -0,0 +1,14 @@
fileFormatVersion: 2
guid: 2f3a20d614c22c442aa19e5533ba3bad
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Documentation.pdf
uploadId: 925032
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 16833f14d8248b847bbc3db445fbcdfd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
@@ -0,0 +1,80 @@
#if UNITY_EDITOR
using UnityEditor;
using UnityEngine;
using System;
using System.Linq;
namespace KD.Destro2D.Editor {
[CustomPropertyDrawer(typeof(Destruction), true)]
public class Destro2DMenu : PropertyDrawer
{
const float PAD = 2f;
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
EditorGUI.BeginProperty(position, label, property);
Rect header = new Rect(
position.x,
position.y,
position.width,
EditorGUIUtility.singleLineHeight
);
string title =
property.managedReferenceValue == null
? "Select Destruction Type"
: property.managedReferenceValue.GetType().Name;
if (GUI.Button(header, title, EditorStyles.popup))
{
var menu = new GenericMenu();
var types = TypeCache.GetTypesDerivedFrom<Destruction>()
.Where(t => !t.IsAbstract && !t.IsGenericType);
foreach (var type in types)
{
menu.AddItem(
new GUIContent(type.Name),
false,
() =>
{
property.managedReferenceValue = Activator.CreateInstance(type);
property.serializedObject.ApplyModifiedProperties();
}
);
}
menu.ShowAsContext();
}
if (property.managedReferenceValue != null)
{
Rect body = new Rect(
position.x,
position.y + EditorGUIUtility.singleLineHeight + PAD,
position.width,
EditorGUI.GetPropertyHeight(property, true)
);
EditorGUI.indentLevel++;
EditorGUI.PropertyField(body, property, GUIContent.none, true);
EditorGUI.indentLevel--;
}
EditorGUI.EndProperty();
}
public override float GetPropertyHeight(SerializedProperty property, GUIContent label)
{
if (property.managedReferenceValue == null)
return EditorGUIUtility.singleLineHeight;
return EditorGUIUtility.singleLineHeight +
PAD +
EditorGUI.GetPropertyHeight(property, true);
}
}
}
#endif
@@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 76818ebe2697ff646b7149645aede1f1
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Editor/Destro2DMenu.cs
uploadId: 925032
+8
View File
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: c2b02695a74a95f4d83876149aa89420
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,25 @@
fileFormatVersion: 2
guid: adcc15677e1b6b04686415d0e2eaf7d6
ScriptedImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 2
userData:
assetBundleName:
assetBundleVariant:
script: {fileID: 11500000, guid: 625f186215c104763be7675aa2d941aa, type: 3}
useAsTemplate: 0
exposeTemplateAsShader: 0
template:
name:
category:
description:
icon: {instanceID: 0}
thumbnail: {instanceID: 0}
AssetOrigin:
serializedVersion: 1
productId: 358408
packageName: Destro 2D - Dynamic Sprite Destruction
packageVersion: 1.0.3
assetPath: Assets/Destro2DMain/Misc/Masker.shadergraph
uploadId: 925032
@@ -60,6 +60,10 @@ namespace EasyChart.UGUI
[Tooltip("If enabled, logs size/resolution changes (only when changed).")]
[SerializeField] private bool _logResolutionChanges = false;
[Header("Interaction")]
[Tooltip("If enabled, the runtime chart bridge behaves as a passive display and will not capture pointer interaction.")]
[SerializeField] private bool _disablePointerInteraction = false;
private UIDocument _uiDocument;
private ChartElement _chartElement;
private RectTransform _rectTransform;
@@ -159,6 +163,21 @@ namespace EasyChart.UGUI
}
}
public bool DisablePointerInteraction
{
get => _disablePointerInteraction;
set
{
if (_disablePointerInteraction == value)
{
return;
}
_disablePointerInteraction = value;
ApplyPointerInteractionMode();
}
}
private void Awake()
{
_rectTransform = GetComponent<RectTransform>();
@@ -182,22 +201,7 @@ namespace EasyChart.UGUI
private void OnDisable()
{
_isInitialized = false;
_lastScreenRect = new Rect(float.NaN, float.NaN, float.NaN, float.NaN);
if (UsesRenderTexturePipeline())
{
if (_chartElement != null)
{
_chartElement.RemoveFromHierarchy();
_chartElement = null;
}
_rootContainer = null;
return;
}
DetachOverlayChartContent();
ReleaseRuntimeResources();
}
private void OnDestroy()
@@ -218,19 +222,7 @@ namespace EasyChart.UGUI
_lastRenderMode = _renderMode;
// Initialize on first LateUpdate to ensure everything is ready
if (!_isInitialized)
{
_isInitialized = true;
if (UsesRenderTexturePipeline())
{
CreateWorldSpaceUI();
}
else
{
CreateUIDocument();
}
UpdateChartProfile();
}
EnsureInitialized();
if (_logResolutionChanges && !_loggedOnce)
{
@@ -266,6 +258,67 @@ namespace EasyChart.UGUI
return _renderMode == ChartRenderMode.WorldSpace || _respectUGUILayering;
}
public void ReleaseRuntimeResources()
{
_isInitialized = false;
_lastScreenRect = new Rect(float.NaN, float.NaN, float.NaN, float.NaN);
DetachOverlayChartContent();
if (_uiDocument != null)
{
_uiDocument.visualTreeAsset = null;
if (_uiDocument.rootVisualElement != null)
{
_uiDocument.rootVisualElement.Clear();
}
if (_createdPanelSettings)
{
_uiDocument.panelSettings = null;
}
}
ReleaseRuntimePanelSettings();
if (_rawImage != null)
{
_rawImage.texture = null;
_rawImage.enabled = false;
_rawImage.raycastTarget = false;
}
ReleaseRenderTexture();
}
public void ForceRebuild()
{
ReleaseRuntimeResources();
EnsureInitialized();
Refresh();
}
private void EnsureInitialized()
{
if (_isInitialized)
{
return;
}
_isInitialized = true;
if (UsesRenderTexturePipeline())
{
CreateWorldSpaceUI();
}
else
{
CreateUIDocument();
}
UpdateChartProfile();
}
private void CreateUIDocument()
{
// Check if UIDocument already exists on this GameObject
@@ -336,6 +389,7 @@ namespace EasyChart.UGUI
_rootContainer.Add(_chartElement);
_uiDocument.rootVisualElement.Add(_rootContainer);
ApplyPointerInteractionMode();
_lastScreenRect = new Rect(float.NaN, float.NaN, float.NaN, float.NaN);
}
@@ -406,6 +460,34 @@ namespace EasyChart.UGUI
_createdPanelSettings = false;
}
private void ApplyPointerInteractionMode()
{
var pickingMode = _disablePointerInteraction ? PickingMode.Ignore : PickingMode.Position;
if (_uiDocument != null && _uiDocument.rootVisualElement != null)
{
_uiDocument.rootVisualElement.pickingMode = pickingMode;
_uiDocument.rootVisualElement.focusable = false;
}
if (_rootContainer != null)
{
_rootContainer.pickingMode = pickingMode;
_rootContainer.focusable = false;
}
if (_chartElement != null)
{
_chartElement.pickingMode = pickingMode;
_chartElement.focusable = false;
}
if (_rawImage != null)
{
_rawImage.raycastTarget = !_disablePointerInteraction;
}
}
private void TryResolvePanelSettingsAsset()
{
if (_panelSettingsAsset != null)
@@ -566,9 +648,11 @@ namespace EasyChart.UGUI
/// </summary>
public void Refresh()
{
EnsureInitialized();
UpdatePosition();
if (_chartElement != null)
{
ApplyPointerInteractionMode();
_chartElement.ForceRefreshProfile();
}
}
@@ -669,6 +753,7 @@ namespace EasyChart.UGUI
_rawImage.texture = _renderTexture;
_rawImage.raycastTarget = false;
_rawImage.color = Color.white;
ApplyPointerInteractionMode();
_lastScreenRect = new Rect(float.NaN, float.NaN, float.NaN, float.NaN);
}
@@ -755,8 +840,47 @@ namespace EasyChart.UGUI
_rawImage = null;
}
if (_renderTexture != null)
ReleaseRenderTexture();
}
private void ReleaseRuntimePanelSettings()
{
if (_runtimePanelSettings == null || !_createdPanelSettings)
{
_runtimePanelSettings = _createdPanelSettings ? null : _runtimePanelSettings;
_createdPanelSettings = false;
return;
}
#if UNITY_EDITOR
if (!Application.isPlaying)
{
var panelSettings = _runtimePanelSettings;
EditorApplication.delayCall += () =>
{
if (panelSettings != null)
{
DestroyImmediate(panelSettings);
}
};
}
else
#endif
{
Destroy(_runtimePanelSettings);
}
_runtimePanelSettings = null;
_createdPanelSettings = false;
}
private void ReleaseRenderTexture()
{
if (_renderTexture == null)
{
return;
}
_renderTexture.Release();
#if UNITY_EDITOR
if (!Application.isPlaying)
@@ -765,7 +889,9 @@ namespace EasyChart.UGUI
EditorApplication.delayCall += () =>
{
if (rt != null)
{
DestroyImmediate(rt);
}
};
}
else
@@ -773,9 +899,9 @@ namespace EasyChart.UGUI
{
Destroy(_renderTexture);
}
_renderTexture = null;
}
}
#endregion
}
+80
View File
@@ -0,0 +1,80 @@
#if UNITY_EDITOR
using System;
using System.IO;
using System.IO.Compression;
using UnityEditor;
using UnityEngine;
public static class DlcPackageBuilderEditor
{
private const string PackageExtension = "bsnkdlc";
[MenuItem("Bansonic/DLC/Build .bsnkdlc From Folder")]
private static void BuildPackageFromFolder()
{
string sourceFolder = EditorUtility.OpenFolderPanel("选择 DLC 源文件夹", Application.dataPath, string.Empty);
if (string.IsNullOrWhiteSpace(sourceFolder) || !Directory.Exists(sourceFolder))
{
return;
}
string defaultName = new DirectoryInfo(sourceFolder).Name + "." + PackageExtension;
string outputPath = EditorUtility.SaveFilePanel("保存 .bsnkdlc", Path.GetDirectoryName(sourceFolder), defaultName, PackageExtension);
if (string.IsNullOrWhiteSpace(outputPath))
{
return;
}
try
{
BuildArchive(sourceFolder, outputPath);
EditorUtility.DisplayDialog("DLC 打包完成", "已生成:\n" + outputPath, "确定");
}
catch (Exception ex)
{
Debug.LogError("[DLC] Build .bsnkdlc failed: " + ex);
EditorUtility.DisplayDialog("DLC 打包失败", ex.Message, "确定");
}
}
private static void BuildArchive(string sourceFolder, string outputPath)
{
if (File.Exists(outputPath))
{
File.Delete(outputPath);
}
string tempZipPath = outputPath + ".tmpzip";
if (File.Exists(tempZipPath))
{
File.Delete(tempZipPath);
}
try
{
using (FileStream stream = new FileStream(tempZipPath, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
using (ZipArchive archive = new ZipArchive(stream, ZipArchiveMode.Create))
{
string[] files = Directory.GetFiles(sourceFolder, "*", SearchOption.AllDirectories);
for (int i = 0; i < files.Length; i++)
{
string filePath = files[i];
string relativePath = filePath.Substring(sourceFolder.Length).TrimStart(Path.DirectorySeparatorChar, Path.AltDirectorySeparatorChar);
relativePath = relativePath.Replace('\\', '/');
archive.CreateEntryFromFile(filePath, relativePath, System.IO.Compression.CompressionLevel.Optimal);
}
}
File.Move(tempZipPath, outputPath);
AssetDatabase.Refresh();
}
finally
{
if (File.Exists(tempZipPath))
{
File.Delete(tempZipPath);
}
}
}
}
#endif
@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 31641bdabfdff814dbdbdefacf70b4bf
@@ -0,0 +1,47 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Bansonic_UIBlurBehind
m_Shader: {fileID: 4800000, guid: 9d7f0b51d62b4f5b8aa1d4c9342f7f1a, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _BackgroundOpacity: 1
- _BlurRadius: 0.95
- _BlurSpread: 0.28
- _ColorMask: 15
- _Stencil: 0
- _StencilComp: 8
- _StencilOp: 0
- _StencilReadMask: 255
- _StencilWriteMask: 255
- _TintStrength: 0
- _UseUIAlphaClip: 0
m_Colors:
- _Color: {r: 1, g: 0.8820755, b: 0.8820755, a: 1}
- _TextureSampleAdd: {r: 0, g: 0, b: 0, a: 0}
m_BuildTextureStacks: []
m_AllowLocking: 1
@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b1b58c64f1c94fa3b592f3711b04a73d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:
File diff suppressed because it is too large Load Diff
@@ -9800,6 +9800,7 @@ MonoBehaviour:
ui_Panel_Character: {fileID: 4117201555059243452}
button_Encyclopendia: {fileID: 1211150764211143563}
ui_Panel_Encyclopendia: {fileID: 4085891565661738151}
notebook_father: {fileID: 0}
image_Character: {fileID: 2579155398995094700}
button_Mail: {fileID: 3719595577548363312}
ui_Panel_Mail: {fileID: 4784173047268348040}
@@ -9813,9 +9814,129 @@ MonoBehaviour:
ui_Panel_Story: {fileID: 6352806538944209249}
button_Setting: {fileID: 1176641313823147389}
ui_Panel_Setting: {fileID: 4409913307177745152}
button_worldChat: {fileID: 0}
worldChatObject: {fileID: 0}
prefab_Enter_Time: 0.35
prefab_Enter_Scale_From: 0.92
prefab_Enter_Ease: 9
button_Idol: {fileID: 0}
ui_Panel_Idol: {fileID: 0}
button_Select_Music: {fileID: 6706780112056706141}
ui_Select_Music_Scene_Name: selectYourSongFirst
play_Enter_OnEnable: 1
enter_Wait_Timeout: 1.5
enter_UI_Speed: 1.25
enter_Zoom_Time: 0.6
enter_Zoom_Scale_From: 1.2
enter_Zoom_Ease: 9
enter_Background_Time: 0.6
enter_Background_Scale_From: 1.12
enter_Background_Ease: 9
enter_Bar_Time: 0.45
enter_Item_Time: 0.35
enter_Stagger: 0.06
enter_Offset_X: 140
enter_Offset_Y: 120
enter_Item_Offset_X: 40
enter_Item_Offset_Y: 40
enter_Move_Ease: 9
play_Background_Deco_Enter: 1
bg_Deco_Time: 0.45
bg_Deco_Stagger: 0.04
bg_Deco_Offset: 60
bg_Deco_Rotate: 6
bg_Deco_Scale_From: 0.9
bg_Deco_Ease: 9
background_Bg2: {fileID: 0}
play_Background_Loop: 0
bg_Loop_Offset: 12
bg_Loop_Time: 6
bg_Loop_Ease: 4
play_Mouse_Gyro: 1
gyro_Require_Enter_Complete: 1
gyro_Use_Unscaled: 1
gyro_Target: {fileID: 0}
gyro_Character_Rect: {fileID: 0}
gyro_Dialog_Rect: {fileID: 0}
gyro_Max_Offset: 5
gyro_Offset_Scale: 7
gyro_Character_Weight: 1
gyro_Dialog_Weight: 1.35
gyro_Background_Weight: 0.8
gyro_RightButtons_Rotation_Weight: 0.6
gyro_DailyTasks_Rotation_Weight: 0.6
gyro_Max_Rotation: 2
gyro_Rotation_X: 1
gyro_Rotation_Y: 1
gyro_Rotation_Z: 0.35
gyro_Smooth: 8
gyro_Apply_BG_Scale: 0
gyro_BG_Extra_Scale: 1.06
gyro_All_Offset_Min: 0.6
gyro_All_Offset_Max: 1.2
gyro_Only_Leaf: 1
gyro_Include_BG_Children: 0
gyro_BG_Child_Offset_Min: 0.2
gyro_BG_Child_Offset_Max: 0.8
gyro_BG_Child_Rotation_Min: 0.1
gyro_BG_Child_Rotation_Max: 0.5
play_Button_Interact: 1
button_Hover_Scale: 1.04
button_Press_Scale: 0.96
button_Hover_Time: 0.08
button_Press_Time: 0.06
button_Release_Time: 0.12
button_Hover_Ease: 6
button_Press_Ease: 6
button_Release_Ease: 27
play_RightButtons_Hover: 1
rightButton_Image_Idle_Offset: 180
rightButton_Image_Final_Offset: 60
rightButton_Image_Move_Time: 0.18
rightButton_Image_Ease: 9
rightButton_Text_Flash_Time: 0.06
rightButton_Text_Flash_Count: 2
rightButton_Text_Flash_Interval: 0.02
fix_Button_Raycast: 1
fix_Button_Raycast_Log: 0
content_Root: {fileID: 0}
zoom_MainRoot: {fileID: 0}
zoom_BarsRoot: {fileID: 0}
group_Background: {fileID: 0}
group_Top: {fileID: 0}
group_Bottom: {fileID: 0}
group_Center: {fileID: 0}
group_DailyTasks: {fileID: 0}
group_RightButtons: {fileID: 0}
group_RightButtons_Alt: {fileID: 0}
else_Button: {fileID: 0}
group_StartButton: {fileID: 0}
dailyTask_BG: {fileID: 0}
dailyTask_BG_1: {fileID: 0}
dailyTask_BG_2: {fileID: 0}
top_PlayerName: {fileID: 0}
button_Character_Set_Rect: {fileID: 0}
launch_EzGame_Rect: {fileID: 0}
character_Dialog_Controller: {fileID: 0}
play_Jiantou_Loop: 1
jiantou_Require_Hover: 1
jiantou_Left_Template: {fileID: 0}
jiantou_Right_Template: {fileID: 0}
jiantou_Name_Contains: jiantou
jiantou_Pool_Size: 6
jiantou_Move_Amplitude: 120
jiantou_Move_Duration: 8
jiantou_Stagger: 0.35
jiantou_Spacing: 180
jiantou_Hover_Move_Duration: 3
jiantou_Hover_Stagger: 0.15
jiantou_Hover_Spacing: 120
jiantou_Random_Y: 0
jiantou_Alpha_Min: 0.35
jiantou_Alpha_Max: 1
jiantou_Flash_Count: 3
jiantou_Flash_Time: 0.06
jiantou_Flash_Interval: 0.04
character_Illustration_Time: 0.5
--- !u!1 &7857607677220165758
GameObject:
@@ -1,5 +1,80 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6982689905656928890
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6860638885831926403}
- component: {fileID: 8176808537246840981}
- component: {fileID: 3650970312932695179}
m_Layer: 5
m_Name: heroProfile
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6860638885831926403
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6982689905656928890}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 2698123542832443311}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 152, y: 205}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8176808537246840981
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6982689905656928890}
m_CullTransparentMesh: 1
--- !u!114 &3650970312932695179
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6982689905656928890}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 9096885730913253353, guid: b065cd31161e1bd4c871e8fd1c9d368d, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &7700495011714786251
GameObject:
m_ObjectHideFlags: 0
@@ -10,6 +85,7 @@ GameObject:
m_Component:
- component: {fileID: 2698123542832443311}
- component: {fileID: 8408867080419616168}
- component: {fileID: 7850357097831154310}
- component: {fileID: 4792987294952551588}
- component: {fileID: 6870718339589324299}
- component: {fileID: 3587359298198180232}
@@ -33,13 +109,14 @@ RectTransform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4503161163256181978}
- {fileID: 6561343147245452701}
- {fileID: 6860638885831926403}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 770.27435, y: 383.8505}
m_SizeDelta: {x: 80, y: 107}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 160.3, y: 211}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8408867080419616168
CanvasRenderer:
@@ -49,6 +126,23 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7700495011714786251}
m_CullTransparentMesh: 1
--- !u!114 &7850357097831154310
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7700495011714786251}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fa7286e478fe9a94bb137978315eeaad, type: 3}
m_Name:
m_EditorClassIdentifier:
characterProfileButton: {fileID: 6870718339589324299}
thisCharacterProfile: {fileID: 3650970312932695179}
beingSelected: {fileID: 828498842158973289}
grayScaleMaterial: {fileID: 2100000, guid: 7701c15f96b443d408ac83222c9b869a, type: 2}
thisHeroId: 0
--- !u!114 &4792987294952551588
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -69,7 +163,7 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 21300000, guid: 8ec62ab8ffad7644fa1b78bb4b8a273d, type: 3}
m_Sprite: {fileID: 6175548864125150824, guid: eef26ee24e23ac54ba278c9270e4aeca, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
@@ -148,7 +242,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 76ce63b908338a84c8a3aa071b90c46b, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &7858675027809163229
--- !u!1 &7733588305641661658
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@@ -156,23 +250,23 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4503161163256181978}
- component: {fileID: 6785248735263285921}
- component: {fileID: 9134740411020661799}
- component: {fileID: 6561343147245452701}
- component: {fileID: 5147382523768653089}
- component: {fileID: 828498842158973289}
m_Layer: 5
m_Name: Text (TMP)
m_Name: beingSelected
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &4503161163256181978
m_IsActive: 1
--- !u!224 &6561343147245452701
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7858675027809163229}
m_GameObject: {fileID: 7733588305641661658}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
@@ -180,29 +274,29 @@ RectTransform:
m_Children: []
m_Father: {fileID: 2698123542832443311}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_SizeDelta: {x: 176, y: 226}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6785248735263285921
--- !u!222 &5147382523768653089
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7858675027809163229}
m_GameObject: {fileID: 7733588305641661658}
m_CullTransparentMesh: 1
--- !u!114 &9134740411020661799
--- !u!114 &828498842158973289
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7858675027809163229}
m_GameObject: {fileID: 7733588305641661658}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
@@ -213,74 +307,13 @@ MonoBehaviour:
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Button
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4281479730
m_fontColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 24
m_fontSizeBase: 24
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_ActiveFontFeatures: 00000000
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
m_Sprite: {fileID: 3948514008214086792, guid: 227633339a10f764f96050e69078f191, type: 3}
m_Type: 0
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,35 @@
using UnityEngine;
using UnityEngine.UI;
public class uiui_character_displayPrefab : MonoBehaviour
{
public Button characterProfileButton;
public Image thisCharacterProfile;
public Image beingSelected;
public Material grayScaleMaterial;
[SerializeField] private int thisHeroId;
public void SetDisplay(Sprite heroSprite, int heroId)
{
thisHeroId = heroId;
if (thisCharacterProfile != null)
{
thisCharacterProfile.sprite = heroSprite;
thisCharacterProfile.preserveAspect = true;
thisCharacterProfile.type = Image.Type.Simple;
}
SetSelected(false, false);
}
public void SetSelected(bool selected, bool animated = true)
{
if (beingSelected == null)
{
return;
}
beingSelected.material = selected ? null : grayScaleMaterial;
}
}

Some files were not shown because too many files have changed in this diff Show More