mirror of
https://github.com/Steffo99/gravity-fusion.git
synced 2024-11-25 01:34:18 +00:00
Everything seems to be working!
This commit is contained in:
parent
1f86bb26fd
commit
8e65f4f948
25 changed files with 382 additions and 276 deletions
45
Assets/Components/BlackHole.cs
Normal file
45
Assets/Components/BlackHole.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c9b169f8058046d4fb7374586f318ae6
|
||||
guid: 2f86d0ffd697a6046a85ea2885566da9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
|
@ -3,12 +3,11 @@ using System.Collections.Generic;
|
|||
using UnityEngine;
|
||||
|
||||
[RequireComponent(typeof(Camera))]
|
||||
public class PanWithMMB : MonoBehaviour
|
||||
public class CameraPan : MonoBehaviour
|
||||
{
|
||||
[Header("References")]
|
||||
protected new Camera camera;
|
||||
public string axisName;
|
||||
|
||||
[Header("Internals")]
|
||||
protected new Camera camera;
|
||||
protected Vector3? lastMousePosition;
|
||||
|
||||
private void Start() {
|
||||
|
@ -17,9 +16,9 @@ public class PanWithMMB : MonoBehaviour
|
|||
}
|
||||
|
||||
private void Update() {
|
||||
bool mmbIsPressed = Input.GetMouseButton(2);
|
||||
bool panIsPressed = Input.GetAxisRaw(axisName) != 0f;
|
||||
Vector3? currentMousePosition = null;
|
||||
if(mmbIsPressed) {
|
||||
if(panIsPressed) {
|
||||
currentMousePosition = camera.ScreenToWorldPoint(Input.mousePosition);
|
||||
if(lastMousePosition.HasValue) {
|
||||
Vector3 positionDelta = lastMousePosition.Value - currentMousePosition.Value;
|
|
@ -4,6 +4,7 @@ using UnityEngine;
|
|||
|
||||
public class GameController : MonoBehaviour
|
||||
{
|
||||
[Header("Global Variables")]
|
||||
public float gravitationConstant;
|
||||
public float gravitationConstant = 2;
|
||||
public int particlesToMerge = 5;
|
||||
public int scaleMultiplier = 3;
|
||||
}
|
||||
|
|
|
@ -5,6 +5,9 @@ using UnityEngine;
|
|||
[RequireComponent(typeof(Rigidbody2D))]
|
||||
public class Gravitation : MonoBehaviour
|
||||
{
|
||||
[Header("Config")]
|
||||
public bool isStatic;
|
||||
|
||||
[Header("Forces")]
|
||||
protected Vector3 appliedForce;
|
||||
|
||||
|
@ -16,17 +19,23 @@ public class Gravitation : MonoBehaviour
|
|||
protected new Rigidbody2D rigidbody;
|
||||
protected GameController gameController;
|
||||
|
||||
|
||||
protected float mass {
|
||||
public float Mass {
|
||||
get {
|
||||
return rigidbody.mass;
|
||||
}
|
||||
}
|
||||
|
||||
set {
|
||||
rigidbody.mass = value;
|
||||
public float GravitationConstant {
|
||||
get {
|
||||
return gameController.gravitationConstant;
|
||||
}
|
||||
}
|
||||
|
||||
private void Awake() {
|
||||
rigidbody = GetComponent<Rigidbody2D>();
|
||||
gameController = GameObject.Find("GameController").GetComponent<GameController>();
|
||||
}
|
||||
|
||||
private void OnEnable() {
|
||||
if(simulatedObjects == null) {
|
||||
simulatedObjects = new List<Gravitation>();
|
||||
|
@ -41,8 +50,6 @@ public class Gravitation : MonoBehaviour
|
|||
|
||||
private void Start()
|
||||
{
|
||||
rigidbody = GetComponent<Rigidbody2D>();
|
||||
gameController = GameObject.Find("GameController").GetComponent<GameController>();
|
||||
appliedForce = new Vector3(0f, 0f, 0f);
|
||||
}
|
||||
|
||||
|
@ -52,12 +59,11 @@ public class Gravitation : MonoBehaviour
|
|||
foreach(Gravitation other in simulatedObjects) {
|
||||
if(other.positionInList <= this.positionInList) continue;
|
||||
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;
|
||||
this.appliedForce += direction * force;
|
||||
other.appliedForce -= direction * force;
|
||||
if(!this.isStatic) rigidbody.AddForce(direction * force);
|
||||
if(!other.isStatic) other.rigidbody.AddForce(-direction * force);
|
||||
}
|
||||
rigidbody.AddForce(appliedForce);
|
||||
appliedForce = new Vector3(0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class MergedInfo : MonoBehaviour
|
||||
{
|
||||
public int mergedCount;
|
||||
public float mergedMass;
|
||||
}
|
57
Assets/Components/Merger.cs
Normal file
57
Assets/Components/Merger.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
52
Assets/Components/Particle.cs
Normal file
52
Assets/Components/Particle.cs
Normal 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>();
|
||||
}
|
||||
}
|
11
Assets/Components/Particle.cs.meta
Normal file
11
Assets/Components/Particle.cs.meta
Normal file
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 14169e6aef16b684f869320425c986ab
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -5,11 +5,9 @@ using UnityEngine;
|
|||
[RequireComponent(typeof(Camera))]
|
||||
public class ZoomWithScrollWheel : MonoBehaviour
|
||||
{
|
||||
[Header("Config")]
|
||||
public float zoomMultiplier;
|
||||
public string zoomAxisName;
|
||||
|
||||
[Header("References")]
|
||||
protected new Camera camera;
|
||||
|
||||
void Start()
|
||||
|
@ -19,7 +17,7 @@ public class ZoomWithScrollWheel : MonoBehaviour
|
|||
|
||||
void Update()
|
||||
{
|
||||
float mouseWheel = Input.GetAxis(zoomAxisName);
|
||||
float mouseWheel = Input.GetAxisRaw(zoomAxisName);
|
||||
if(mouseWheel != 0) {
|
||||
camera.orthographicSize = Mathf.Clamp(camera.orthographicSize - mouseWheel * zoomMultiplier, 0, float.PositiveInfinity);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &5508245818244581766
|
||||
--- !u!1 &2084275844800580026
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
@ -8,38 +8,40 @@ GameObject:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 6572685539244401289}
|
||||
- component: {fileID: 7383058586621682203}
|
||||
- component: {fileID: 3951280190561447455}
|
||||
- component: {fileID: 5758426961102176851}
|
||||
- component: {fileID: 2084275844800580021}
|
||||
- component: {fileID: 2084275844800580022}
|
||||
- component: {fileID: 2084275844800580024}
|
||||
- component: {fileID: 2084275844800580023}
|
||||
- component: {fileID: 2084275844800580025}
|
||||
- component: {fileID: 3271020097140099258}
|
||||
m_Layer: 0
|
||||
m_Name: Sun
|
||||
m_Name: Protostar
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &6572685539244401289
|
||||
--- !u!4 &2084275844800580021
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {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_LocalPosition: {x: -2.31, y: -0.09, z: 0}
|
||||
m_LocalScale: {x: 1.5, y: 1.5, z: 1.5}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1.5, y: 1.5, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &7383058586621682203
|
||||
--- !u!212 &2084275844800580022
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5508245818244581766}
|
||||
m_GameObject: {fileID: 2084275844800580026}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
|
@ -73,7 +75,7 @@ SpriteRenderer:
|
|||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
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_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
|
@ -83,19 +85,19 @@ SpriteRenderer:
|
|||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!50 &3951280190561447455
|
||||
--- !u!50 &2084275844800580024
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5508245818244581766}
|
||||
m_GameObject: {fileID: 2084275844800580026}
|
||||
m_BodyType: 0
|
||||
m_Simulated: 1
|
||||
m_UseFullKinematicContacts: 0
|
||||
m_UseAutoMass: 1
|
||||
m_Mass: 5
|
||||
m_UseAutoMass: 0
|
||||
m_Mass: 10
|
||||
m_LinearDrag: 0
|
||||
m_AngularDrag: 0.05
|
||||
m_GravityScale: 0
|
||||
|
@ -104,19 +106,49 @@ Rigidbody2D:
|
|||
m_SleepingMode: 1
|
||||
m_CollisionDetection: 0
|
||||
m_Constraints: 0
|
||||
--- !u!58 &5758426961102176851
|
||||
--- !u!58 &2084275844800580023
|
||||
CircleCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5508245818244581766}
|
||||
m_GameObject: {fileID: 2084275844800580026}
|
||||
m_Enabled: 1
|
||||
m_Density: 1
|
||||
m_Material: {fileID: 0}
|
||||
m_IsTrigger: 0
|
||||
m_IsTrigger: 1
|
||||
m_UsedByEffector: 0
|
||||
m_UsedByComposite: 0
|
||||
m_Offset: {x: 0, y: 0}
|
||||
serializedVersion: 2
|
||||
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
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d810808c92b542d418721ca53dca1fee
|
||||
guid: d2ff0823532914e4a8f5ecd0efc2a146
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
|
@ -98,7 +98,9 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 6c6157b8c0c98584db4becc892a8f6fd, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
prefab: {fileID: 5473375028011702754, guid: e73d8e05bd7498c4a80a63094f4594a8, type: 3}
|
||||
prefabToSpawn: {fileID: 5473375028011702754, guid: e73d8e05bd7498c4a80a63094f4594a8,
|
||||
type: 3}
|
||||
mouseButton: 0
|
||||
--- !u!114 &1504932583
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -111,7 +113,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 45a8a9da7e5b8734eb709105fd6e30e1, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
zoomMultiplier: 1
|
||||
zoomMultiplier: 3
|
||||
zoomAxisName: MouseWheel
|
||||
--- !u!114 &1504932587
|
||||
MonoBehaviour:
|
||||
|
@ -125,3 +127,4 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: faf7dfc2fa2059f4a96e4a134b4ef2ab, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
axisName: MouseLeft
|
||||
|
|
|
@ -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}
|
|
@ -9,13 +9,13 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5473375028011702783}
|
||||
- component: {fileID: 1061936008197383768}
|
||||
- component: {fileID: 5473375028011702782}
|
||||
- component: {fileID: 5473375028011702753}
|
||||
- component: {fileID: 5473375028011702752}
|
||||
- component: {fileID: 5473375028011702755}
|
||||
- component: {fileID: 5319285082587561044}
|
||||
m_Layer: 0
|
||||
m_Name: Gravitation Object
|
||||
m_Name: Particle
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
@ -29,13 +29,31 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5473375028011702754}
|
||||
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_Children:
|
||||
- {fileID: 851405983337701308}
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 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
|
||||
Rigidbody2D:
|
||||
serializedVersion: 4
|
||||
|
@ -135,49 +153,8 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: d16f17bda197c324f8b088f106c66c5c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
isStatic: 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
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -238,6 +215,4 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: 1010c8363cc1ebd4e9c1808f9a2737e2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
mergeIntoPrefab: {fileID: 5508245818244581766, guid: 81be647bed73a164cb47269e43863cac,
|
||||
type: 3}
|
||||
setMergedMassFromTotal: 1
|
||||
particle: {fileID: 0}
|
|
@ -1,7 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 81be647bed73a164cb47269e43863cac
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -121,6 +121,105 @@ NavMeshSettings:
|
|||
debug:
|
||||
m_Flags: 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
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -188,6 +287,11 @@ PrefabInstance:
|
|||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 4937878819460165300, guid: bf08d766b6e86cf4a8773489143ab2d5,
|
||||
type: 3}
|
||||
propertyPath: gravitationConstant
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: bf08d766b6e86cf4a8773489143ab2d5, type: 3}
|
||||
--- !u!1001 &9221969453494073200
|
||||
|
@ -240,7 +344,7 @@ PrefabInstance:
|
|||
- target: {fileID: 9221969453073420272, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9221969453073420272, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1,
|
||||
type: 3}
|
||||
|
@ -257,10 +361,9 @@ PrefabInstance:
|
|||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1504932582, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1, type: 3}
|
||||
propertyPath: prefabToSpawn
|
||||
value:
|
||||
objectReference: {fileID: 5473375028011702754, guid: e73d8e05bd7498c4a80a63094f4594a8,
|
||||
type: 3}
|
||||
- target: {fileID: 1504932587, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1, type: 3}
|
||||
propertyPath: axisName
|
||||
value: MouseMiddle
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: 6baf9ec6ad712d940a83a3bf6ae3e6b1, type: 3}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dcd4e7f566b6b1f49964b0b51c681ac6
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -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
|
|
@ -1,8 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7c8c2f042ca8bcf468405a9dff7f1571
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -92,7 +92,7 @@ InputManager:
|
|||
negativeButton:
|
||||
positiveButton: mouse 2
|
||||
altNegativeButton:
|
||||
altPositiveButton: w
|
||||
altPositiveButton: space
|
||||
gravity: 0
|
||||
dead: 0
|
||||
sensitivity: 0.1
|
||||
|
|
Loading…
Reference in a new issue