1
Fork 0
mirror of https://github.com/Steffo99/gravity-fusion.git synced 2024-11-22 16:24:20 +00:00

Everything seems to be working!

This commit is contained in:
Steffo 2019-10-05 20:41:07 +02:00
parent 1f86bb26fd
commit 8e65f4f948
25 changed files with 382 additions and 276 deletions

View file

@ -0,0 +1,45 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Rigidbody2D))]
[RequireComponent(typeof(Collider2D))]
public class BlackHole : MonoBehaviour
{
public float Mass {
get {
return rigidbody.mass;
}
set {
rigidbody.mass = value;
Scale = Mass / Mathf.Pow(Mathf.PI, 2);
}
}
public float Scale {
get {
return transform.localScale.x;
}
set {
transform.localScale = new Vector3(value, value, 1);
}
}
protected new Rigidbody2D rigidbody;
protected void Awake() {
rigidbody = GetComponent<Rigidbody2D>();
}
protected void Start() {
Mass = 50;
}
protected void OnTriggerEnter2D(Collider2D other) {
Particle otherParticle = other.GetComponent<Particle>();
if(otherParticle != null) {
Mass += otherParticle.Mass;
Destroy(otherParticle.gameObject);
}
}
}

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: c9b169f8058046d4fb7374586f318ae6 guid: 2f86d0ffd697a6046a85ea2885566da9
MonoImporter: MonoImporter:
externalObjects: {} externalObjects: {}
serializedVersion: 2 serializedVersion: 2

View file

@ -3,12 +3,11 @@ using System.Collections.Generic;
using UnityEngine; using UnityEngine;
[RequireComponent(typeof(Camera))] [RequireComponent(typeof(Camera))]
public class PanWithMMB : MonoBehaviour public class CameraPan : MonoBehaviour
{ {
[Header("References")] public string axisName;
protected new Camera camera;
[Header("Internals")] protected new Camera camera;
protected Vector3? lastMousePosition; protected Vector3? lastMousePosition;
private void Start() { private void Start() {
@ -17,9 +16,9 @@ public class PanWithMMB : MonoBehaviour
} }
private void Update() { private void Update() {
bool mmbIsPressed = Input.GetMouseButton(2); bool panIsPressed = Input.GetAxisRaw(axisName) != 0f;
Vector3? currentMousePosition = null; Vector3? currentMousePosition = null;
if(mmbIsPressed) { if(panIsPressed) {
currentMousePosition = camera.ScreenToWorldPoint(Input.mousePosition); currentMousePosition = camera.ScreenToWorldPoint(Input.mousePosition);
if(lastMousePosition.HasValue) { if(lastMousePosition.HasValue) {
Vector3 positionDelta = lastMousePosition.Value - currentMousePosition.Value; Vector3 positionDelta = lastMousePosition.Value - currentMousePosition.Value;

View file

@ -4,6 +4,7 @@ using UnityEngine;
public class GameController : MonoBehaviour public class GameController : MonoBehaviour
{ {
[Header("Global Variables")] public float gravitationConstant = 2;
public float gravitationConstant; public int particlesToMerge = 5;
public int scaleMultiplier = 3;
} }

View file

@ -5,6 +5,9 @@ using UnityEngine;
[RequireComponent(typeof(Rigidbody2D))] [RequireComponent(typeof(Rigidbody2D))]
public class Gravitation : MonoBehaviour public class Gravitation : MonoBehaviour
{ {
[Header("Config")]
public bool isStatic;
[Header("Forces")] [Header("Forces")]
protected Vector3 appliedForce; protected Vector3 appliedForce;
@ -16,17 +19,23 @@ public class Gravitation : MonoBehaviour
protected new Rigidbody2D rigidbody; protected new Rigidbody2D rigidbody;
protected GameController gameController; protected GameController gameController;
public float Mass {
protected float mass {
get { get {
return rigidbody.mass; return rigidbody.mass;
} }
}
set { public float GravitationConstant {
rigidbody.mass = value; get {
return gameController.gravitationConstant;
} }
} }
private void Awake() {
rigidbody = GetComponent<Rigidbody2D>();
gameController = GameObject.Find("GameController").GetComponent<GameController>();
}
private void OnEnable() { private void OnEnable() {
if(simulatedObjects == null) { if(simulatedObjects == null) {
simulatedObjects = new List<Gravitation>(); simulatedObjects = new List<Gravitation>();
@ -41,8 +50,6 @@ public class Gravitation : MonoBehaviour
private void Start() private void Start()
{ {
rigidbody = GetComponent<Rigidbody2D>();
gameController = GameObject.Find("GameController").GetComponent<GameController>();
appliedForce = new Vector3(0f, 0f, 0f); appliedForce = new Vector3(0f, 0f, 0f);
} }
@ -52,12 +59,11 @@ public class Gravitation : MonoBehaviour
foreach(Gravitation other in simulatedObjects) { foreach(Gravitation other in simulatedObjects) {
if(other.positionInList <= this.positionInList) continue; if(other.positionInList <= this.positionInList) continue;
float distance = Vector3.Distance(this.transform.position, other.transform.position); float distance = Vector3.Distance(this.transform.position, other.transform.position);
float force = gameController.gravitationConstant * this.mass * other.mass / Mathf.Pow(distance, 2); float force = GravitationConstant * this.Mass * other.Mass / Mathf.Pow(distance, 2);
Vector3 direction = (other.transform.position - this.transform.position).normalized; Vector3 direction = (other.transform.position - this.transform.position).normalized;
this.appliedForce += direction * force; if(!this.isStatic) rigidbody.AddForce(direction * force);
other.appliedForce -= direction * force; if(!other.isStatic) other.rigidbody.AddForce(-direction * force);
} }
rigidbody.AddForce(appliedForce);
appliedForce = new Vector3(0, 0, 0); appliedForce = new Vector3(0, 0, 0);
} }
} }

View file

@ -1,65 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(CircleCollider2D))]
public class Merge : MonoBehaviour
{
[Header("Config")]
public GameObject mergeIntoPrefab;
public bool setMergedMassFromTotal;
[Header("References")]
protected new CircleCollider2D collider;
[Header("Internals")]
protected List<Merge> mergeables;
private void Start()
{
collider = GetComponent<CircleCollider2D>();
mergeables = new List<Merge>();
mergeables.Add(this);
}
private void OnTriggerEnter2D(Collider2D other) {
Merge otherMerge = other.GetComponent<Merge>();
if(otherMerge != null) {
mergeables.Add(otherMerge);
if(CanMerge()) DoMerge();
}
}
private void OnTriggerExit2D(Collider2D other) {
Merge otherMerge = other.GetComponent<Merge>();
if(otherMerge != null) {
mergeables.Remove(otherMerge);
}
}
protected bool CanMerge() {
return mergeables.Count >= 5;
}
protected void DoMerge() {
GameObject mergeResult = Instantiate(mergeIntoPrefab, transform.position, Quaternion.identity);
MergedInfo mergedInfo = mergeResult.AddComponent<MergedInfo>();
mergedInfo.mergedCount = mergeables.Count;
foreach(Merge merged in mergeables.ToArray()) {
Rigidbody2D mergedBody = merged.GetComponentInParent<Rigidbody2D>();
if(mergedBody != null) {
mergedInfo.mergedMass += mergedBody.mass;
}
Destroy(merged.transform.parent.gameObject);
}
if(setMergedMassFromTotal) {
Rigidbody2D mergeRigidbody = mergeResult.GetComponent<Rigidbody2D>();
if(mergeRigidbody != null) {
mergeRigidbody.useAutoMass = false;
mergeRigidbody.mass = mergedInfo.mergedMass;
}
}
}
}

View file

@ -1,9 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class MergedInfo : MonoBehaviour
{
public int mergedCount;
public float mergedMass;
}

View file

@ -0,0 +1,57 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(CircleCollider2D))]
public class Merger : MonoBehaviour
{
public Particle particle;
protected List<Merger> mergeCandidates;
protected Collider2D Collider {
get {
return particle.mergeCollider;
}
}
protected int ParticlesToMerge {
get {
return particle.gameController.particlesToMerge;
}
}
protected void Awake() {
particle = GetComponentInParent<Particle>();
}
protected void Start() {
mergeCandidates = new List<Merger>();
}
private void OnTriggerEnter2D(Collider2D other) {
Merger otherMerger = other.GetComponent<Merger>();
if(otherMerger == null) return;
Particle otherParticle = otherMerger.particle;
if(this.particle.Tier != otherParticle.Tier) return;
mergeCandidates.Add(otherMerger);
if(CanMerge()) DoMerge();
}
private void OnTriggerExit2D(Collider2D other) {
Merger otherMerger = other.GetComponent<Merger>();
if(otherMerger == null) return;
mergeCandidates.Remove(otherMerger);
}
protected bool CanMerge() {
return mergeCandidates.Count >= ParticlesToMerge;
}
protected void DoMerge() {
particle.Tier += 1;
foreach(Merger merged in mergeCandidates.ToArray()) {
Destroy(merged.particle.gameObject);
}
}
}

View file

@ -0,0 +1,52 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Rigidbody2D))]
[RequireComponent(typeof(Collider2D))]
[RequireComponent(typeof(Gravitation))]
public class Particle : MonoBehaviour {
protected int _tier = 0;
public new Rigidbody2D rigidbody;
public Gravitation gravitation;
public GameController gameController;
public Merger merger;
public Collider2D particleCollider;
public Collider2D mergeCollider;
public int Tier {
get {
return _tier;
}
set {
_tier += 1;
Scale *= gameController.scaleMultiplier;
}
}
public float Scale {
get {
return transform.localScale.x;
}
set {
transform.localScale = new Vector3(value, value, 1);
}
}
public float Mass {
get {
return Mathf.Pow(gameController.particlesToMerge, Tier);
}
}
protected void Awake() {
rigidbody = GetComponent<Rigidbody2D>();
gravitation = GetComponent<Gravitation>();
gameController = GameObject.Find("GameController").GetComponent<GameController>();
merger = GetComponentInChildren<Merger>();
particleCollider = GetComponent<Collider2D>();
mergeCollider = merger.GetComponent<Collider2D>();
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 14169e6aef16b684f869320425c986ab
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -5,11 +5,9 @@ using UnityEngine;
[RequireComponent(typeof(Camera))] [RequireComponent(typeof(Camera))]
public class ZoomWithScrollWheel : MonoBehaviour public class ZoomWithScrollWheel : MonoBehaviour
{ {
[Header("Config")]
public float zoomMultiplier; public float zoomMultiplier;
public string zoomAxisName; public string zoomAxisName;
[Header("References")]
protected new Camera camera; protected new Camera camera;
void Start() void Start()
@ -19,7 +17,7 @@ public class ZoomWithScrollWheel : MonoBehaviour
void Update() void Update()
{ {
float mouseWheel = Input.GetAxis(zoomAxisName); float mouseWheel = Input.GetAxisRaw(zoomAxisName);
if(mouseWheel != 0) { if(mouseWheel != 0) {
camera.orthographicSize = Mathf.Clamp(camera.orthographicSize - mouseWheel * zoomMultiplier, 0, float.PositiveInfinity); camera.orthographicSize = Mathf.Clamp(camera.orthographicSize - mouseWheel * zoomMultiplier, 0, float.PositiveInfinity);
} }

View file

@ -1,6 +1,6 @@
%YAML 1.1 %YAML 1.1
%TAG !u! tag:unity3d.com,2011: %TAG !u! tag:unity3d.com,2011:
--- !u!1 &5508245818244581766 --- !u!1 &2084275844800580026
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
@ -8,38 +8,40 @@ GameObject:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 6572685539244401289} - component: {fileID: 2084275844800580021}
- component: {fileID: 7383058586621682203} - component: {fileID: 2084275844800580022}
- component: {fileID: 3951280190561447455} - component: {fileID: 2084275844800580024}
- component: {fileID: 5758426961102176851} - component: {fileID: 2084275844800580023}
- component: {fileID: 2084275844800580025}
- component: {fileID: 3271020097140099258}
m_Layer: 0 m_Layer: 0
m_Name: Sun m_Name: Protostar
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
m_StaticEditorFlags: 0 m_StaticEditorFlags: 0
m_IsActive: 1 m_IsActive: 1
--- !u!4 &6572685539244401289 --- !u!4 &2084275844800580021
Transform: Transform:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5508245818244581766} m_GameObject: {fileID: 2084275844800580026}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2.31, y: -0.09, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5} m_LocalScale: {x: 1.5, y: 1.5, z: 1}
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &7383058586621682203 --- !u!212 &2084275844800580022
SpriteRenderer: SpriteRenderer:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5508245818244581766} m_GameObject: {fileID: 2084275844800580026}
m_Enabled: 1 m_Enabled: 1
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
@ -73,7 +75,7 @@ SpriteRenderer:
m_SortingLayer: 0 m_SortingLayer: 0
m_SortingOrder: 0 m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: d8cf31929ca287542bdc219ec19f002e, type: 3} m_Sprite: {fileID: 21300000, guid: d8cf31929ca287542bdc219ec19f002e, type: 3}
m_Color: {r: 1, g: 1, b: 0, a: 1} m_Color: {r: 1, g: 1, b: 1, a: 0.15686275}
m_FlipX: 0 m_FlipX: 0
m_FlipY: 0 m_FlipY: 0
m_DrawMode: 0 m_DrawMode: 0
@ -83,19 +85,19 @@ SpriteRenderer:
m_WasSpriteAssigned: 1 m_WasSpriteAssigned: 1
m_MaskInteraction: 0 m_MaskInteraction: 0
m_SpriteSortPoint: 0 m_SpriteSortPoint: 0
--- !u!50 &3951280190561447455 --- !u!50 &2084275844800580024
Rigidbody2D: Rigidbody2D:
serializedVersion: 4 serializedVersion: 4
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5508245818244581766} m_GameObject: {fileID: 2084275844800580026}
m_BodyType: 0 m_BodyType: 0
m_Simulated: 1 m_Simulated: 1
m_UseFullKinematicContacts: 0 m_UseFullKinematicContacts: 0
m_UseAutoMass: 1 m_UseAutoMass: 0
m_Mass: 5 m_Mass: 10
m_LinearDrag: 0 m_LinearDrag: 0
m_AngularDrag: 0.05 m_AngularDrag: 0.05
m_GravityScale: 0 m_GravityScale: 0
@ -104,19 +106,49 @@ Rigidbody2D:
m_SleepingMode: 1 m_SleepingMode: 1
m_CollisionDetection: 0 m_CollisionDetection: 0
m_Constraints: 0 m_Constraints: 0
--- !u!58 &5758426961102176851 --- !u!58 &2084275844800580023
CircleCollider2D: CircleCollider2D:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0} m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5508245818244581766} m_GameObject: {fileID: 2084275844800580026}
m_Enabled: 1 m_Enabled: 1
m_Density: 1 m_Density: 1
m_Material: {fileID: 0} m_Material: {fileID: 0}
m_IsTrigger: 0 m_IsTrigger: 1
m_UsedByEffector: 0 m_UsedByEffector: 0
m_UsedByComposite: 0 m_UsedByComposite: 0
m_Offset: {x: 0, y: 0} m_Offset: {x: 0, y: 0}
serializedVersion: 2 serializedVersion: 2
m_Radius: 0.5 m_Radius: 0.5
--- !u!114 &2084275844800580025
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2084275844800580026}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d16f17bda197c324f8b088f106c66c5c, type: 3}
m_Name:
m_EditorClassIdentifier:
isStatic: 1
positionInList: 0
--- !u!114 &3271020097140099258
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2084275844800580026}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 2f86d0ffd697a6046a85ea2885566da9, type: 3}
m_Name:
m_EditorClassIdentifier:
absorbedParticles: 0
absorbedMass: 0
scaleOnMass: 1
syncMass: 1

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d810808c92b542d418721ca53dca1fee guid: d2ff0823532914e4a8f5ecd0efc2a146
PrefabImporter: PrefabImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View file

@ -98,7 +98,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 6c6157b8c0c98584db4becc892a8f6fd, type: 3} m_Script: {fileID: 11500000, guid: 6c6157b8c0c98584db4becc892a8f6fd, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
prefab: {fileID: 5473375028011702754, guid: e73d8e05bd7498c4a80a63094f4594a8, type: 3} prefabToSpawn: {fileID: 5473375028011702754, guid: e73d8e05bd7498c4a80a63094f4594a8,
type: 3}
mouseButton: 0
--- !u!114 &1504932583 --- !u!114 &1504932583
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -111,7 +113,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 45a8a9da7e5b8734eb709105fd6e30e1, type: 3} m_Script: {fileID: 11500000, guid: 45a8a9da7e5b8734eb709105fd6e30e1, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
zoomMultiplier: 1 zoomMultiplier: 3
zoomAxisName: MouseWheel zoomAxisName: MouseWheel
--- !u!114 &1504932587 --- !u!114 &1504932587
MonoBehaviour: MonoBehaviour:
@ -125,3 +127,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: faf7dfc2fa2059f4a96e4a134b4ef2ab, type: 3} m_Script: {fileID: 11500000, guid: faf7dfc2fa2059f4a96e4a134b4ef2ab, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
axisName: MouseLeft

View file

@ -1,32 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6786529680537240613
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 7085311716076432966}
m_Layer: 0
m_Name: Nothing
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &7085311716076432966
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6786529680537240613}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View file

@ -9,13 +9,13 @@ GameObject:
serializedVersion: 6 serializedVersion: 6
m_Component: m_Component:
- component: {fileID: 5473375028011702783} - component: {fileID: 5473375028011702783}
- component: {fileID: 1061936008197383768}
- component: {fileID: 5473375028011702782} - component: {fileID: 5473375028011702782}
- component: {fileID: 5473375028011702753} - component: {fileID: 5473375028011702753}
- component: {fileID: 5473375028011702752} - component: {fileID: 5473375028011702752}
- component: {fileID: 5473375028011702755} - component: {fileID: 5473375028011702755}
- component: {fileID: 5319285082587561044}
m_Layer: 0 m_Layer: 0
m_Name: Gravitation Object m_Name: Particle
m_TagString: Untagged m_TagString: Untagged
m_Icon: {fileID: 0} m_Icon: {fileID: 0}
m_NavMeshLayer: 0 m_NavMeshLayer: 0
@ -29,13 +29,31 @@ Transform:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5473375028011702754} m_GameObject: {fileID: 5473375028011702754}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -2, y: 0.88, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: m_Children:
- {fileID: 851405983337701308} - {fileID: 851405983337701308}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1061936008197383768
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5473375028011702754}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 14169e6aef16b684f869320425c986ab, type: 3}
m_Name:
m_EditorClassIdentifier:
rigidbody: {fileID: 0}
gravitation: {fileID: 0}
gameController: {fileID: 0}
merger: {fileID: 0}
particleCollider: {fileID: 0}
mergeCollider: {fileID: 0}
--- !u!50 &5473375028011702782 --- !u!50 &5473375028011702782
Rigidbody2D: Rigidbody2D:
serializedVersion: 4 serializedVersion: 4
@ -135,49 +153,8 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d16f17bda197c324f8b088f106c66c5c, type: 3} m_Script: {fileID: 11500000, guid: d16f17bda197c324f8b088f106c66c5c, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
isStatic: 0
positionInList: 0 positionInList: 0
--- !u!114 &5319285082587561044
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5473375028011702754}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8cb7610d172100841907b194dece1565, type: 3}
m_Name:
m_EditorClassIdentifier:
disappearAfter: 5
colorCurve:
serializedVersion: 2
key0: {r: 1, g: 0, b: 0, a: 0}
key1: {r: 1, g: 1, b: 1, a: 1}
key2: {r: 1, g: 0.82856506, b: 0.82856506, a: 0}
key3: {r: 0, g: 0, b: 0, a: 0}
key4: {r: 0, g: 0, b: 0, a: 0}
key5: {r: 0, g: 0, b: 0, a: 0}
key6: {r: 0, g: 0, b: 0, a: 0}
key7: {r: 0, g: 0, b: 0, a: 0}
ctime0: 0
ctime1: 65535
ctime2: 21203
ctime3: 0
ctime4: 0
ctime5: 0
ctime6: 0
ctime7: 0
atime0: 0
atime1: 65535
atime2: 0
atime3: 0
atime4: 0
atime5: 0
atime6: 0
atime7: 0
m_Mode: 0
m_NumColorKeys: 2
m_NumAlphaKeys: 2
--- !u!1 &8635663089806839545 --- !u!1 &8635663089806839545
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -238,6 +215,4 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1010c8363cc1ebd4e9c1808f9a2737e2, type: 3} m_Script: {fileID: 11500000, guid: 1010c8363cc1ebd4e9c1808f9a2737e2, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
mergeIntoPrefab: {fileID: 5508245818244581766, guid: 81be647bed73a164cb47269e43863cac, particle: {fileID: 0}
type: 3}
setMergedMassFromTotal: 1

View file

@ -1,7 +0,0 @@
fileFormatVersion: 2
guid: 81be647bed73a164cb47269e43863cac
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -121,6 +121,105 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!1001 &769317669
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2084275844800580026, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_Name
value: BlackHole
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalScale.x
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580021, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_LocalScale.y
value: 2
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580024, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_Mass
value: 7
objectReference: {fileID: 0}
- target: {fileID: 2084275844800580023, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: m_Radius
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 3271020097140099258, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: absorbedParticles
value: 7
objectReference: {fileID: 0}
- target: {fileID: 3271020097140099258, guid: d2ff0823532914e4a8f5ecd0efc2a146,
type: 3}
propertyPath: absorbedMass
value: 7
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d2ff0823532914e4a8f5ecd0efc2a146, type: 3}
--- !u!1001 &1803533283597936005 --- !u!1001 &1803533283597936005
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -188,6 +287,11 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4937878819460165300, guid: bf08d766b6e86cf4a8773489143ab2d5,
type: 3}
propertyPath: gravitationConstant
value: 2
objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: bf08d766b6e86cf4a8773489143ab2d5, type: 3} m_SourcePrefab: {fileID: 100100000, guid: bf08d766b6e86cf4a8773489143ab2d5, type: 3}
--- !u!1001 &9221969453494073200 --- !u!1001 &9221969453494073200
@ -240,7 +344,7 @@ PrefabInstance:
- target: {fileID: 9221969453073420272, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1, - target: {fileID: 9221969453073420272, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 1 value: 2
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9221969453073420272, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1, - target: {fileID: 9221969453073420272, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1,
type: 3} type: 3}
@ -257,10 +361,9 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1504932582, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1, type: 3} - target: {fileID: 1504932587, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1, type: 3}
propertyPath: prefabToSpawn propertyPath: axisName
value: value: MouseMiddle
objectReference: {fileID: 5473375028011702754, guid: e73d8e05bd7498c4a80a63094f4594a8, objectReference: {fileID: 0}
type: 3}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1, type: 3}

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: dcd4e7f566b6b1f49964b0b51c681ac6
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,47 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !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: d2dc886499c26824283350fa532d087d, type: 3}
m_Name: XRGeneralSettings
m_EditorClassIdentifier:
Keys: 01000000
Values:
- {fileID: 8859528010114943273}
--- !u!114 &7854906144317399671
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: f4c3631f5e58749a59194e0cf6baf6d5, type: 3}
m_Name: Standalone Loaders
m_EditorClassIdentifier:
m_RequiresSettingsUpdate: 0
m_AutomaticLoading: 0
m_AutomaticRunning: 0
m_Loaders: []
--- !u!114 &8859528010114943273
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: d236b7d11115f2143951f1e14045df39, type: 3}
m_Name: Standalone Settings
m_EditorClassIdentifier:
m_LoaderManagerInstance: {fileID: 7854906144317399671}
m_InitManagerOnStart: 1

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: 7c8c2f042ca8bcf468405a9dff7f1571
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -92,7 +92,7 @@ InputManager:
negativeButton: negativeButton:
positiveButton: mouse 2 positiveButton: mouse 2
altNegativeButton: altNegativeButton:
altPositiveButton: w altPositiveButton: space
gravity: 0 gravity: 0
dead: 0 dead: 0
sensitivity: 0.1 sensitivity: 0.1