this again
This commit is contained in:
parent
b68e9cd967
commit
5bd1f3ac72
File diff suppressed because it is too large
Load diff
8
Assets/Resources/Prefabs/Games/CheerReaders.meta
Normal file
8
Assets/Resources/Prefabs/Games/CheerReaders.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 16b9fb6c076f6284297ab1d37ce3a28c
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
3165
Assets/Resources/Prefabs/Games/CheerReaders/faceSprites.prefab
Normal file
3165
Assets/Resources/Prefabs/Games/CheerReaders/faceSprites.prefab
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7c6d75c16a01d654d83742726e4c82ca
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
4690
Assets/Resources/Prefabs/Games/CheerReaders/pepSquad.prefab
Normal file
4690
Assets/Resources/Prefabs/Games/CheerReaders/pepSquad.prefab
Normal file
File diff suppressed because it is too large
Load diff
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 537a3388e1d42af4ca47d4d79e575480
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -1,12 +1,18 @@
|
|||
using HeavenStudio.Games.Scripts_PajamaParty;
|
||||
using HeavenStudio.Util;
|
||||
using JetBrains.Annotations;
|
||||
using Starpelly.Transformer;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Rendering;
|
||||
using static HeavenStudio.EntityTypes;
|
||||
|
||||
namespace HeavenStudio.Games.Loaders
|
||||
{
|
||||
using static Minigames;
|
||||
public static class RvlBooksLoader
|
||||
public static class RvlBookLoader
|
||||
{
|
||||
public static Minigame AddGame(EventCaller eventCaller)
|
||||
{
|
||||
|
@ -21,16 +27,58 @@ namespace HeavenStudio.Games
|
|||
{
|
||||
public class CheerReaders : Minigame
|
||||
{
|
||||
[Header("Objects")]
|
||||
public GameObject PepSquadMember;
|
||||
public GameObject faceSprites;
|
||||
|
||||
[Header("Positions")]
|
||||
public Transform SpawnRoot;
|
||||
|
||||
public static CheerReaders instance;
|
||||
RvlCharacter[,] chars;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
{
|
||||
instance = this;
|
||||
//spawn characters & faces
|
||||
// is 4x3 grid
|
||||
// c c c c
|
||||
// c c c c
|
||||
// c c c P
|
||||
chars = new RvlCharacter[4, 3];
|
||||
float RADIUS = 2.75f;
|
||||
float scale = 1.0f;
|
||||
int sorting = 10;
|
||||
Vector3 spawnPos = SpawnRoot.position + new Vector3(-RADIUS * 3, 0);
|
||||
for (int y = 0; y < 3; y++)
|
||||
{
|
||||
for (int x = 0; x < 4; x++)
|
||||
{
|
||||
//on x-axis we go left to right
|
||||
spawnPos += new Vector3(RADIUS * scale, 0);
|
||||
if (!(y == 0 && x == 2)) //don't spawn at the player's position
|
||||
{
|
||||
GameObject mobj = Instantiate(PepSquadMember, SpawnRoot.parent);
|
||||
RvlCharacter character = mobj.GetComponent<RvlCharacter>();
|
||||
mobj.GetComponent<SortingGroup>().sortingOrder = sorting;
|
||||
mobj.transform.localPosition = new Vector3(spawnPos.x, spawnPos.y, spawnPos.z);
|
||||
mobj.transform.localScale = new Vector3(scale, scale);
|
||||
character.row = y;
|
||||
character.col = x;
|
||||
chars[x, y] = character;
|
||||
}
|
||||
scale -= 0.1f;
|
||||
spawnPos = SpawnRoot.position - new Vector3(RADIUS * 3 * scale, -RADIUS / 3.75f * (y + 1), -RADIUS / 5f * (y + 1));
|
||||
sorting--;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,10 @@ guid: 1f54dd4f8a76ab24fa06309eac9311b7
|
|||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
defaultReferences:
|
||||
- PepSquadMember: {fileID: 2375284159521911160, guid: 537a3388e1d42af4ca47d4d79e575480, type: 3}
|
||||
- faceSprites: {fileID: 5174819151919031259, guid: 7c6d75c16a01d654d83742726e4c82ca, type: 3}
|
||||
- SpawnRoot: {instanceID: 0}
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
|
|
28
Assets/Scripts/Games/CheerReaders/RvlCharacter.cs
Normal file
28
Assets/Scripts/Games/CheerReaders/RvlCharacter.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class RvlCharacter : MonoBehaviour
|
||||
{
|
||||
[Header("Objects")]
|
||||
public GameObject BaseModel;
|
||||
public Animator BaseAnim;
|
||||
|
||||
public int row;
|
||||
public int col;
|
||||
|
||||
private bool firstCue = true;
|
||||
private bool bookFront = false;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Awake()
|
||||
{
|
||||
BaseAnim = BaseModel.GetComponent<Animator>();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
13
Assets/Scripts/Games/CheerReaders/RvlCharacter.cs.meta
Normal file
13
Assets/Scripts/Games/CheerReaders/RvlCharacter.cs.meta
Normal file
|
@ -0,0 +1,13 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 52fc4bed1556bb449810725f94962f9b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences:
|
||||
- BaseModel: {fileID: 2375284159521911160, guid: 537a3388e1d42af4ca47d4d79e575480, type: 3}
|
||||
- BaseAnim: {instanceID: 0}
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in a new issue