Built to Scale (DS) asset setup

This commit is contained in:
Jenny Crowe
2022-02-15 16:28:08 -07:00
parent bea09a5d2f
commit 1a839517c8
85 changed files with 9609 additions and 0 deletions

View File

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

View 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;
}
}
}

View File

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

View File

@ -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>()
{