i believe my pc has been set ablaze
This commit is contained in:
parent
24ab1b213e
commit
c67146ea1a
10 changed files with 178 additions and 123 deletions
|
|
@ -21356,12 +21356,12 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 382827736}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 59.76, y: -39.01, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_Father: {fileID: 439163859}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1001 &394036755
|
||||
PrefabInstance:
|
||||
|
|
@ -21616,7 +21616,7 @@ Transform:
|
|||
- {fileID: 1972076835}
|
||||
- {fileID: 1483226599}
|
||||
- {fileID: 1432589379}
|
||||
- {fileID: 1516594163}
|
||||
- {fileID: 382827739}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &446769396
|
||||
|
|
@ -24201,6 +24201,54 @@ MonoBehaviour:
|
|||
m_hasFontAssetChanged: 0
|
||||
m_baseMaterial: {fileID: 0}
|
||||
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
|
||||
--- !u!1 &994553007
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 994553009}
|
||||
- component: {fileID: 994553008}
|
||||
m_Layer: 0
|
||||
m_Name: LevelSwitcher
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &994553008
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 994553007}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 717ca245990ccea7580364c54b200c8d, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
stages:
|
||||
currentStage: 0
|
||||
uiStage: 1
|
||||
shopStage: 2
|
||||
--- !u!4 &994553009
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 994553007}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &1008626377
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -26258,12 +26306,12 @@ Transform:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1516594162}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 439163859}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1516594164
|
||||
MonoBehaviour:
|
||||
|
|
@ -52488,6 +52536,8 @@ SceneRoots:
|
|||
- {fileID: 519420032}
|
||||
- {fileID: 619394802}
|
||||
- {fileID: 583397146}
|
||||
- {fileID: 994553009}
|
||||
- {fileID: 1516594163}
|
||||
- {fileID: 439163859}
|
||||
- {fileID: 394036755}
|
||||
- {fileID: 1683661728}
|
||||
|
|
@ -52495,4 +52545,3 @@ SceneRoots:
|
|||
- {fileID: 1319590957}
|
||||
- {fileID: 1935311237}
|
||||
- {fileID: 1411132463}
|
||||
- {fileID: 382827739}
|
||||
|
|
|
|||
|
|
@ -3494,98 +3494,6 @@ CanvasRenderer:
|
|||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 918232564}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!1 &948791715
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 948791718}
|
||||
- component: {fileID: 948791717}
|
||||
- component: {fileID: 948791716}
|
||||
m_Layer: 0
|
||||
m_Name: Main Camera
|
||||
m_TagString: MainCamera
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!81 &948791716
|
||||
AudioListener:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 948791715}
|
||||
m_Enabled: 1
|
||||
--- !u!20 &948791717
|
||||
Camera:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 948791715}
|
||||
m_Enabled: 1
|
||||
serializedVersion: 2
|
||||
m_ClearFlags: 1
|
||||
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
|
||||
m_projectionMatrixMode: 1
|
||||
m_GateFitMode: 2
|
||||
m_FOVAxisMode: 0
|
||||
m_Iso: 200
|
||||
m_ShutterSpeed: 0.005
|
||||
m_Aperture: 16
|
||||
m_FocusDistance: 10
|
||||
m_FocalLength: 50
|
||||
m_BladeCount: 5
|
||||
m_Curvature: {x: 2, y: 11}
|
||||
m_BarrelClipping: 0.25
|
||||
m_Anamorphism: 0
|
||||
m_SensorSize: {x: 36, y: 24}
|
||||
m_LensShift: {x: 0, y: 0}
|
||||
m_NormalizedViewPortRect:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 1
|
||||
height: 1
|
||||
near clip plane: 0.3
|
||||
far clip plane: 1000
|
||||
field of view: 60
|
||||
orthographic: 1
|
||||
orthographic size: 5
|
||||
m_Depth: -1
|
||||
m_CullingMask:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_RenderingPath: -1
|
||||
m_TargetTexture: {fileID: 0}
|
||||
m_TargetDisplay: 0
|
||||
m_TargetEye: 3
|
||||
m_HDR: 1
|
||||
m_AllowMSAA: 1
|
||||
m_AllowDynamicResolution: 0
|
||||
m_ForceIntoRT: 0
|
||||
m_OcclusionCulling: 1
|
||||
m_StereoConvergence: 10
|
||||
m_StereoSeparation: 0.022
|
||||
--- !u!4 &948791718
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 948791715}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: -10}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &954012639
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -7092,6 +7000,5 @@ RectTransform:
|
|||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
m_Roots:
|
||||
- {fileID: 948791718}
|
||||
- {fileID: 1185067170}
|
||||
- {fileID: 1068812598}
|
||||
|
|
|
|||
|
|
@ -422,6 +422,61 @@ Transform:
|
|||
m_CorrespondingSourceObject: {fileID: 5661264056639479186, guid: 8764555a5fdde3428903d7ac06f8ff7f, type: 3}
|
||||
m_PrefabInstance: {fileID: 1952728174}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
--- !u!1 &2080483293
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2080483295}
|
||||
- component: {fileID: 2080483294}
|
||||
m_Layer: 0
|
||||
m_Name: AbilityManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &2080483294
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2080483293}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1536116e866f6604e8d93d80bb9a6237, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
player: {fileID: 0}
|
||||
upgradeToAdd: {fileID: 11400000, guid: 6fe34d7ec95c2ce1fac0727c553b5f0b, type: 2}
|
||||
upgradeButton: {fileID: 0}
|
||||
allUpgrades:
|
||||
- {fileID: 11400000, guid: 6fe34d7ec95c2ce1fac0727c553b5f0b, type: 2}
|
||||
- {fileID: 11400000, guid: 8ba5b877541778773b0434cf7e36cebb, type: 2}
|
||||
allAbilities:
|
||||
- {fileID: 8579369158027197764, guid: d695e39a8ed83e67aa09d75b33cf7bb3, type: 3}
|
||||
- {fileID: 8579369158027197764, guid: fc8f0e7853997c463b72085306621f40, type: 3}
|
||||
- {fileID: 2212103048918046095, guid: 2d849b52879286a90a56fa3955e0adb6, type: 3}
|
||||
- {fileID: 2202756030888818067, guid: 91297fef450704432837e8de1bda05d7, type: 3}
|
||||
--- !u!4 &2080483295
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2080483293}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!1 &2082374415
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -524,4 +579,5 @@ SceneRoots:
|
|||
- {fileID: 1498229352}
|
||||
- {fileID: 1845127810}
|
||||
- {fileID: 2082374418}
|
||||
- {fileID: 2080483295}
|
||||
- {fileID: 1952728174}
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ public class AbilityManager : MonoBehaviour
|
|||
{
|
||||
upgradesInventory.Remove(upgrade);
|
||||
}
|
||||
ability.AddUpgrade(upgrade);
|
||||
ability.AddUpgrade(upgrade, 1);
|
||||
AbilityUIHandler.instance.UpdateInventory();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,12 +18,13 @@ public class AbilityUIHandler : MonoBehaviour
|
|||
return;
|
||||
}
|
||||
instance = this;
|
||||
playerAbilityHandler = FindFirstObjectByType<MarisaAbilityHandler>();
|
||||
}
|
||||
|
||||
#endregion
|
||||
[Header("Abilities")]
|
||||
public List<Button> uiObjects = new();
|
||||
[SerializeField] private MarisaAbilityHandler playerAbilityHandler;
|
||||
private MarisaAbilityHandler playerAbilityHandler;
|
||||
[SerializeField] private AbilityUIObject abilityUI;
|
||||
|
||||
[Header("Upgrades")]
|
||||
|
|
|
|||
|
|
@ -48,13 +48,13 @@ public class PlayerAbility : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
public void AddUpgrade(AbilityUpgrade upgrade)
|
||||
public void AddUpgrade(AbilityUpgrade upgrade, int amount)
|
||||
{
|
||||
if (!attachedUpgrades.ContainsKey(upgrade))
|
||||
{
|
||||
attachedUpgrades[upgrade] = 0;
|
||||
}
|
||||
attachedUpgrades[upgrade]++;
|
||||
attachedUpgrades[upgrade] += amount;
|
||||
upgrade.ApplyUpgrade(this);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
|
|
@ -15,7 +16,7 @@ public class AbilitySceneTransfer : MonoBehaviour
|
|||
return;
|
||||
}
|
||||
instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
DontDestroyOnLoad(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
@ -31,7 +32,7 @@ public class AbilitySceneTransfer : MonoBehaviour
|
|||
public MarisaAbilityHandler abilityHandler;
|
||||
|
||||
[ContextMenu("Save")]
|
||||
public void TestSaving()
|
||||
public void SaveAllAbilities()
|
||||
{
|
||||
int testSlot = 0;
|
||||
foreach (PlayerAbility ability in abilityHandler.abilityInstances)
|
||||
|
|
@ -46,6 +47,7 @@ public class AbilitySceneTransfer : MonoBehaviour
|
|||
{
|
||||
LoadAbilities();
|
||||
}
|
||||
|
||||
public void SaveAbility(PlayerAbility savedAbility)
|
||||
{
|
||||
SavedAbility newSavedAbility = new();
|
||||
|
|
@ -72,7 +74,7 @@ public class AbilitySceneTransfer : MonoBehaviour
|
|||
if (savedAbility.abilityName == ability.abilityName) //shit code
|
||||
{
|
||||
foundAbility = ability;
|
||||
return;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -80,22 +82,25 @@ public class AbilitySceneTransfer : MonoBehaviour
|
|||
{
|
||||
Debug.LogWarning($"{savedAbility.abilityName} was not found.");
|
||||
}
|
||||
switch (savedAbility.abilitySlot)
|
||||
{
|
||||
case SavedAbility.AbilitySlot.Primary :
|
||||
abilityHandler.abilities[0] = foundAbility;
|
||||
break;
|
||||
case SavedAbility.AbilitySlot.Secondary :
|
||||
abilityHandler.abilities[1] = foundAbility;
|
||||
break;
|
||||
case SavedAbility.AbilitySlot.SpellA :
|
||||
abilityHandler.abilities[2] = foundAbility;
|
||||
break;
|
||||
case SavedAbility.AbilitySlot.SpellB :
|
||||
abilityHandler.abilities[3] = foundAbility;
|
||||
break;
|
||||
}
|
||||
abilityHandler.abilities.Add(foundAbility);
|
||||
}
|
||||
abilityHandler.SetupAbilities();
|
||||
foreach (PlayerAbility abilityInstance in abilityHandler.abilityInstances)
|
||||
{
|
||||
foreach (SavedAbility savedAbility in savedAbilities)
|
||||
{
|
||||
if (savedAbility.abilityName == abilityInstance.abilityName) //shit code
|
||||
{
|
||||
foreach (AbilityUpgrade upgrade in AbilityManager.instance.allUpgrades)
|
||||
{
|
||||
if (savedAbility.equippedUpgrades[upgrade.upgradeName] > 0)
|
||||
{
|
||||
abilityInstance.AddUpgrade(upgrade, savedAbility.equippedUpgrades[upgrade.upgradeName]);
|
||||
}
|
||||
} //this is REALLY BAD.
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,13 @@ public class EnemySpawner : MonoBehaviour
|
|||
SpawnEnemy(enemiesToSpawn[Random.Range(0, enemiesToSpawn.Length)], spawnPoints[Random.Range(0, spawnPoints.Count)].position);
|
||||
}
|
||||
}
|
||||
else if (!canSpawn && bossEnemy)
|
||||
{
|
||||
if (Input.GetKey(KeyCode.E))
|
||||
{
|
||||
LevelSwitcher.instance.LoadShop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Enemy SpawnEnemy(Enemy enemy, Vector3 location)
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class LevelSwitcher : MonoBehaviour
|
||||
{
|
||||
|
|
@ -14,13 +15,36 @@ public class LevelSwitcher : MonoBehaviour
|
|||
return;
|
||||
}
|
||||
instance = this;
|
||||
DontDestroyOnLoad(this);
|
||||
}
|
||||
|
||||
#endregion
|
||||
public int[] stages; //uhh....
|
||||
public int currentStage;
|
||||
[SerializeField] private int uiStage;
|
||||
[SerializeField] private int shopStage;
|
||||
|
||||
|
||||
[ContextMenu("Load Shop")]
|
||||
public void LoadShop()
|
||||
{
|
||||
AbilitySceneTransfer.instance.SaveAllAbilities();
|
||||
SceneManager.LoadScene(shopStage);
|
||||
SceneManager.LoadScene(uiStage, LoadSceneMode.Additive);
|
||||
SetupScene();
|
||||
}
|
||||
public void ChangeLevel()
|
||||
{
|
||||
currentStage++;
|
||||
AbilitySceneTransfer.instance.SaveAllAbilities();
|
||||
SceneManager.LoadScene(stages[currentStage]);
|
||||
SceneManager.LoadScene(uiStage, LoadSceneMode.Additive);
|
||||
SetupScene();
|
||||
}
|
||||
|
||||
public void SetupScene()
|
||||
{
|
||||
AbilitySceneTransfer.instance.abilityHandler = FindFirstObjectByType<MarisaAbilityHandler>();
|
||||
AbilitySceneTransfer.instance.LoadAbilities();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,12 @@ EditorBuildSettings:
|
|||
- enabled: 1
|
||||
path: Assets/Scenes/Game.unity
|
||||
guid: 8c9cfa26abfee488c85f1582747f6a02
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/PlayerUI.unity
|
||||
guid: eaaa9aebc0d420312a3970d73b89c8aa
|
||||
- enabled: 1
|
||||
path: Assets/Scenes/Shop.unity
|
||||
guid: 39468df1f0ebd841e9eeb12f5a5888c4
|
||||
m_configObjects:
|
||||
com.unity.input.settings.actions: {fileID: -944628639613478452, guid: 2bcd2660ca9b64942af0de543d8d7100, type: 3}
|
||||
m_UseUCBPForAssetBundles: 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue