mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-12 08:37:37 +02:00
Built to Scale (DS) asset setup
This commit is contained in:
8
Assets/Scripts/Games/BuiltToScaleDS.meta
Normal file
8
Assets/Scripts/Games/BuiltToScaleDS.meta
Normal file
@ -0,0 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 50baaff9fe35f4141883043e070deb06
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
55
Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs
Normal file
55
Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using NaughtyBezierCurves;
|
||||
using DG.Tweening;
|
||||
|
||||
using RhythmHeavenMania.Util;
|
||||
namespace RhythmHeavenMania.Games.BuiltToScaleDS
|
||||
{
|
||||
public class BuiltToScaleDS : Minigame
|
||||
{
|
||||
[Header("Camera")]
|
||||
public Transform renderQuadTrans;
|
||||
public Transform cameraPos;
|
||||
|
||||
[Header("References")]
|
||||
public SkinnedMeshRenderer environmentRenderer;
|
||||
|
||||
[Header("Properties")]
|
||||
public float beltSpeed = 1f;
|
||||
|
||||
private Material beltMaterial;
|
||||
private Material[] environmentMaterials;
|
||||
private float currentBeltOffset;
|
||||
|
||||
public static BuiltToScaleDS instance;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
instance = this;
|
||||
|
||||
environmentMaterials = environmentRenderer.materials;
|
||||
beltMaterial = Instantiate(environmentMaterials[8]);
|
||||
environmentMaterials[8] = beltMaterial;
|
||||
}
|
||||
|
||||
|
||||
void Start()
|
||||
{
|
||||
renderQuadTrans.gameObject.SetActive(true);
|
||||
|
||||
var cam = GameCamera.instance.camera;
|
||||
var camHeight = 2f * cam.orthographicSize;
|
||||
var camWidth = camHeight * cam.aspect;
|
||||
renderQuadTrans.localScale = new Vector3(camWidth, camHeight, 1f);
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
currentBeltOffset = (currentBeltOffset + Time.deltaTime * -beltSpeed) % 1f;
|
||||
beltMaterial.mainTextureOffset = new Vector2(0f, currentBeltOffset);
|
||||
environmentRenderer.materials = environmentMaterials;
|
||||
}
|
||||
}
|
||||
}
|
11
Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs.meta
Normal file
11
Assets/Scripts/Games/BuiltToScaleDS/BuiltToScaleDS.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 63a465b1b0daa8b488d99a21f844dcf5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -225,6 +225,10 @@ namespace RhythmHeavenMania
|
||||
new GameAction("fast rally", delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.Fast); }, 6f),
|
||||
new GameAction("superfast rally", delegate { RhythmRally.instance.PrepareFastRally(eventCaller.currentEntity.beat, RhythmRally.RallySpeed.SuperFast); }, 12f),
|
||||
new GameAction("pose", delegate { RhythmRally.instance.Pose(); }, 0.5f),
|
||||
}),
|
||||
new Minigame("builtToScaleDS", "Built To Scale (DS) \n<color=#eb5454>[WIP don't use]</color>", "B888F8", true, false, new List<GameAction>()
|
||||
{
|
||||
|
||||
}),
|
||||
/*new Minigame("spaceDance", "Space Dance", "B888F8", new List<GameAction>()
|
||||
{
|
||||
|
Reference in New Issue
Block a user