A PROPER Initialization of Cheer Readers (#184)
* a PROPER initialization * a PROPER initialization * this again
This commit is contained in:
parent
b68e9cd967
commit
ab492fb8dd
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:
|
8
Assets/Resources/Sprites/Games/CheerReaders.meta
Normal file
8
Assets/Resources/Sprites/Games/CheerReaders.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 66232ab835dd09c439eea4d929fa363e
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 24b352df6bcdbc64b96fce9ee9d4219b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,43 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: BaseAnim
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 6745209438453687570}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1107 &6745209438453687570
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates: []
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 0}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8c8a4112baf1811489422f73880f22c9
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,43 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!91 &9100000
|
||||
AnimatorController:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Face
|
||||
serializedVersion: 5
|
||||
m_AnimatorParameters: []
|
||||
m_AnimatorLayers:
|
||||
- serializedVersion: 5
|
||||
m_Name: Base Layer
|
||||
m_StateMachine: {fileID: 2276716275810042943}
|
||||
m_Mask: {fileID: 0}
|
||||
m_Motions: []
|
||||
m_Behaviours: []
|
||||
m_BlendingMode: 0
|
||||
m_SyncedLayerIndex: -1
|
||||
m_DefaultWeight: 0
|
||||
m_IKPass: 0
|
||||
m_SyncedLayerAffectsTiming: 0
|
||||
m_Controller: {fileID: 9100000}
|
||||
--- !u!1107 &2276716275810042943
|
||||
AnimatorStateMachine:
|
||||
serializedVersion: 6
|
||||
m_ObjectHideFlags: 1
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: Base Layer
|
||||
m_ChildStates: []
|
||||
m_ChildStateMachines: []
|
||||
m_AnyStateTransitions: []
|
||||
m_EntryTransitions: []
|
||||
m_StateMachineTransitions: {}
|
||||
m_StateMachineBehaviours: []
|
||||
m_AnyStatePosition: {x: 50, y: 20, z: 0}
|
||||
m_EntryPosition: {x: 50, y: 120, z: 0}
|
||||
m_ExitPosition: {x: 800, y: 120, z: 0}
|
||||
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
|
||||
m_DefaultState: {fileID: 0}
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 80c23f6002ca3c842a809e6c28afabcc
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 9100000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -24,7 +24,6 @@ TextureImporter:
|
|||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMasterTextureLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
|
@ -395,7 +394,7 @@ TextureImporter:
|
|||
x: 717
|
||||
y: 998
|
||||
width: 29
|
||||
height: 24
|
||||
height: 20
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
|
@ -1046,7 +1045,7 @@ TextureImporter:
|
|||
x: 577
|
||||
y: 798
|
||||
width: 39
|
||||
height: 33
|
||||
height: 27
|
||||
alignment: 0
|
||||
pivot: {x: 0.5, y: 0.5}
|
||||
border: {x: 0, y: 0, z: 0, w: 0}
|
||||
|
@ -2351,113 +2350,6 @@ TextureImporter:
|
|||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable:
|
||||
TempSprites1_99: 1609356582
|
||||
TempSprites1_0: -1077835112
|
||||
TempSprites1_91: 1081829027
|
||||
TempSprites1_15: 2055864068
|
||||
TempSprites1_37: 234024925
|
||||
TempSprites1_47: 165529251
|
||||
TempSprites1_28: 1090240709
|
||||
TempSprites1_35: -1126018560
|
||||
TempSprites1_92: 1423616685
|
||||
TempSprites1_40: -1188179589
|
||||
TempSprites1_7: 1265066313
|
||||
TempSprites1_76: 339337131
|
||||
TempSprites1_104: 833687623
|
||||
TempSprites1_50: -2117471102
|
||||
TempSprites1_83: -1274207013
|
||||
TempSprites1_3: -1158368885
|
||||
TempSprites1_39: 626837582
|
||||
TempSprites1_30: 1447235827
|
||||
TempSprites1_14: 379517730
|
||||
TempSprites1_32: -763586061
|
||||
TempSprites1_79: 811487684
|
||||
TempSprites1_94: 382596752
|
||||
TempSprites1_80: 1997995235
|
||||
TempSprites1_62: -231468032
|
||||
TempSprites1_8: 956343107
|
||||
TempSprites1_58: 532901849
|
||||
TempSprites1_89: 884286926
|
||||
TempSprites1_82: -204070438
|
||||
TempSprites1_52: -1438425452
|
||||
TempSprites1_19: -985202933
|
||||
TempSprites1_13: 102319025
|
||||
TempSprites1_43: 492958639
|
||||
TempSprites1_23: 1893710526
|
||||
TempSprites1_75: -178335807
|
||||
TempSprites1_93: 1546922481
|
||||
TempSprites1_66: -1324712625
|
||||
TempSprites1_96: -467751086
|
||||
TempSprites1_44: 172696597
|
||||
TempSprites1_48: -464073596
|
||||
TempSprites1_67: 1187233905
|
||||
TempSprites1_12: -1800469509
|
||||
TempSprites1_36: -1703172911
|
||||
TempSprites1_101: 1995744405
|
||||
TempSprites1_1: 1038617382
|
||||
TempSprites1_46: 1637128179
|
||||
TempSprites1_69: -1000977677
|
||||
TempSprites1_87: 496626691
|
||||
TempSprites1_81: 2129390677
|
||||
TempSprites1_64: -662191564
|
||||
TempSprites1_5: -1167439402
|
||||
TempSprites1_102: -1183729877
|
||||
TempSprites1_98: 1578040116
|
||||
TempSprites1_33: 1888298273
|
||||
TempSprites1_22: 735429581
|
||||
TempSprites1_63: 711547387
|
||||
TempSprites1_78: -1779935215
|
||||
TempSprites1_29: -1827674551
|
||||
TempSprites1_18: 190094634
|
||||
TempSprites1_77: -2043883075
|
||||
TempSprites1_11: -293608041
|
||||
TempSprites1_55: 1110801801
|
||||
TempSprites1_53: 1366255624
|
||||
TempSprites1_61: 157411017
|
||||
TempSprites1_26: -237443082
|
||||
TempSprites1_65: 290991067
|
||||
TempSprites1_97: -589495611
|
||||
TempSprites1_21: -1792921412
|
||||
TempSprites1_10: 503331781
|
||||
TempSprites1_34: -559696863
|
||||
TempSprites1_38: -1727695866
|
||||
TempSprites1_73: -1979141547
|
||||
TempSprites1_60: -1593006864
|
||||
TempSprites1_71: 1268065815
|
||||
TempSprites1_25: -291855803
|
||||
TempSprites1_6: -1959901850
|
||||
TempSprites1_20: 620243037
|
||||
TempSprites1_100: 1534405466
|
||||
TempSprites1_68: -1221429765
|
||||
TempSprites1_4: 906328792
|
||||
TempSprites1_51: -467671783
|
||||
TempSprites1_45: -1096480618
|
||||
TempSprites1_88: -424317102
|
||||
TempSprites1_74: 1134952191
|
||||
TempSprites1_103: 324465166
|
||||
TempSprites1_86: 2046539223
|
||||
TempSprites1_70: -1003280036
|
||||
TempSprites1_54: 1870066435
|
||||
TempSprites1_27: -1930076426
|
||||
TempSprites1_16: 743791811
|
||||
TempSprites1_49: -1215862597
|
||||
TempSprites1_2: 1929545715
|
||||
TempSprites1_57: 1045257183
|
||||
TempSprites1_42: 678041364
|
||||
TempSprites1_105: 1104537170
|
||||
TempSprites1_17: -60253630
|
||||
TempSprites1_84: 1770509503
|
||||
TempSprites1_56: 1328929291
|
||||
TempSprites1_85: -456537640
|
||||
TempSprites1_90: -1421379194
|
||||
TempSprites1_72: 979683250
|
||||
TempSprites1_24: -962150363
|
||||
TempSprites1_41: 1784830225
|
||||
TempSprites1_9: 178502173
|
||||
TempSprites1_31: -23012166
|
||||
TempSprites1_95: 844904546
|
||||
TempSprites1_59: 624424401
|
||||
spritePackingTag:
|
||||
pSDRemoveMatte: 0
|
||||
pSDShowRemoveMatteOption: 0
|
||||
|
|
8
Assets/Scripts/Games/CheerReaders.meta
Normal file
8
Assets/Scripts/Games/CheerReaders.meta
Normal file
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 607e7087c659d92498e4c702d985a84b
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
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:
|
File diff suppressed because one or more lines are too long
|
@ -2,13 +2,13 @@
|
|||
"dependencies": {
|
||||
"com.unity.2d.sprite": "1.0.0",
|
||||
"com.unity.assetbundlebrowser": "https://github.com/Unity-Technologies/AssetBundles-Browser.git",
|
||||
"com.unity.collab-proxy": "1.15.4",
|
||||
"com.unity.ide.rider": "3.0.14",
|
||||
"com.unity.ide.visualstudio": "2.0.15",
|
||||
"com.unity.collab-proxy": "1.17.2",
|
||||
"com.unity.ide.rider": "3.0.15",
|
||||
"com.unity.ide.visualstudio": "2.0.16",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
"com.unity.nuget.newtonsoft-json": "2.0.2",
|
||||
"com.unity.nuget.newtonsoft-json": "3.0.2",
|
||||
"com.unity.postprocessing": "3.2.1",
|
||||
"com.unity.test-framework": "1.1.29",
|
||||
"com.unity.test-framework": "1.1.31",
|
||||
"com.unity.textmeshpro": "3.0.6",
|
||||
"com.unity.timeline": "1.4.8",
|
||||
"com.unity.ugui": "1.0.0",
|
||||
|
|
|
@ -14,11 +14,10 @@
|
|||
"hash": "b7c279278d1a343c6957c9f15b45173d3211f01c"
|
||||
},
|
||||
"com.unity.collab-proxy": {
|
||||
"version": "1.15.4",
|
||||
"version": "1.17.2",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
"com.unity.nuget.newtonsoft-json": "2.0.0",
|
||||
"com.unity.services.core": "1.0.1"
|
||||
},
|
||||
"url": "https://packages.unity.com"
|
||||
|
@ -31,7 +30,7 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.14",
|
||||
"version": "3.0.15",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
@ -40,7 +39,7 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.ide.visualstudio": {
|
||||
"version": "2.0.15",
|
||||
"version": "2.0.16",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
@ -56,7 +55,7 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.nuget.newtonsoft-json": {
|
||||
"version": "2.0.2",
|
||||
"version": "3.0.2",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {},
|
||||
|
@ -81,7 +80,7 @@
|
|||
"url": "https://packages.unity.com"
|
||||
},
|
||||
"com.unity.test-framework": {
|
||||
"version": "1.1.29",
|
||||
"version": "1.1.31",
|
||||
"depth": 0,
|
||||
"source": "registry",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
m_EditorVersion: 2020.3.25f1
|
||||
m_EditorVersionWithRevision: 2020.3.25f1 (9b9180224418)
|
||||
m_EditorVersion: 2020.3.39f1
|
||||
m_EditorVersionWithRevision: 2020.3.39f1 (fd6670bb8be9)
|
||||
|
|
Loading…
Reference in a new issue