-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Stole a stars background from: https://youtu.be/Hjl5Tsnjirs
- Loading branch information
Showing
20 changed files
with
14,992 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
|
||
{ | ||
"name": "Unity Editor", | ||
"type": "unity", | ||
"path": "/C:/Users/jackc/OneDrive/Documents/Dev/Unity/Vacuum/Library/EditorInstance.json", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "Windows Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "OSX Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "Linux Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "iOS Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "Android Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "Xbox One Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "PS4 Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "SwitchPlayer", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "Unity Editor", | ||
"type": "unity", | ||
"path": "/C:/Users/jackc/OneDrive/Documents/Dev/Unity/Vacuum/Library/EditorInstance.json", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "Windows Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "OSX Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "Linux Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "iOS Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "Android Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "Xbox One Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "PS4 Player", | ||
"type": "unity", | ||
"request": "launch" | ||
}, | ||
{ | ||
"name": "SwitchPlayer", | ||
"type": "unity", | ||
"request": "launch" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class StarBackgroundControl : MonoBehaviour { | ||
private SpriteRenderer renderer; | ||
private Material material; | ||
private Shader starShader; | ||
|
||
public float paralax = 0.0f; | ||
|
||
// Start is called before the first frame update | ||
void Start() { | ||
renderer = gameObject.GetComponent<SpriteRenderer>(); | ||
material = renderer.material; | ||
starShader = renderer.material.shader; | ||
} | ||
|
||
// Update is called once per frame | ||
void Update() { | ||
material.SetVector("_Offset", transform.position * paralax); | ||
float height = Camera.main.orthographicSize * 2f; | ||
float width = height * Camera.main.aspect; | ||
transform.localScale = new Vector3(width, height); | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.