mirror of
https://github.com/RHeavenStudio/HeavenStudio.git
synced 2025-06-13 07:37:38 +02:00
Resource Optimization (#812)
* right foot creep * look around stay low * optimize the fan club prefab use anim layers for the monkeys * dansa med oss * klappa era hander * cossack sandvich * soldier of dance add speed halving / doubling functionality to choreographies * fix selection of starting dance * asset re-organization * organize the last of the 1.0 games * Wall * floating windows can no longer become larger than the actual screen
This commit is contained in:
@ -257,6 +257,7 @@ namespace HeavenStudio.Games
|
||||
//spawn 12, the 4th is our player (idx 3)
|
||||
Vector3 origin = spectatorAnchor.transform.localPosition;
|
||||
int sortOrigin = spectatorAnchor.GetComponent<SortingGroup>().sortingOrder;
|
||||
int row = 1;
|
||||
Vector3 spawnPos = new Vector3(origin.x, origin.y, origin.z);
|
||||
spawnPos.x -= RADIUS * 2 * 3;
|
||||
for (int i = 0; i < FAN_COUNT; i++)
|
||||
@ -264,7 +265,8 @@ namespace HeavenStudio.Games
|
||||
GameObject mobj = Instantiate(spectator, spectatorAnchor.transform.parent);
|
||||
NtrIdolFan fan = mobj.GetComponent<NtrIdolFan>();
|
||||
mobj.transform.localPosition = new Vector3(spawnPos.x, spawnPos.y, spawnPos.z);
|
||||
mobj.GetComponent<SortingGroup>().sortingOrder = i + sortOrigin;
|
||||
fan.SetRow(row, sortOrigin);
|
||||
// mobj.GetComponent<SortingGroup>().sortingOrder = i + sortOrigin;
|
||||
if (i == 3)
|
||||
{
|
||||
Player = fan;
|
||||
@ -283,7 +285,7 @@ namespace HeavenStudio.Games
|
||||
spawnPos = new Vector3(origin.x, origin.y, origin.z);
|
||||
spawnPos.x -= RADIUS * 2 * 4 - RADIUS;
|
||||
spawnPos.y -= RADIUS;
|
||||
// spawnPos.z -= RADIUS/4;
|
||||
row++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering; //don't ask
|
||||
using System;
|
||||
|
||||
using NaughtyBezierCurves;
|
||||
@ -15,8 +16,8 @@ namespace HeavenStudio.Games.Scripts_FanClub
|
||||
[Header("References")]
|
||||
[SerializeField] private GameObject motionRoot;
|
||||
[SerializeField] private GameObject headRoot;
|
||||
[SerializeField] private SortingGroup sortingGroup;
|
||||
public Animator animator;
|
||||
public Animator headAnimator;
|
||||
public ParticleSystem fanClapEffect;
|
||||
public GameObject shadow;
|
||||
|
||||
@ -273,11 +274,19 @@ namespace HeavenStudio.Games.Scripts_FanClub
|
||||
|
||||
public void MakeAngry(bool flip = false)
|
||||
{
|
||||
headAnimator.Play("FanFaceAngry", -1, 0);
|
||||
if (flip)
|
||||
{
|
||||
headRoot.transform.localScale = new Vector3(-1f, 1f, 1f);
|
||||
animator.Play("Head.FanFaceAngryFlip", -1, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
animator.Play("Head.FanFaceAngry", -1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public void SetRow(int row, int origin = 0)
|
||||
{
|
||||
sortingGroup.sortingOrder = origin + row;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user