added font, updated ui, fixed some code
This commit is contained in:
parent
10ad860d3e
commit
17a0a22dd4
@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 76682d815193b9b41958835c6f85f98c
|
||||
NativeFormatImporter:
|
||||
guid: 4e480b14d07922334ac294e5cd802706
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 15600000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Fonts/FranxurterTotallyMedium-gxwjp.ttf
Normal file
BIN
Assets/Fonts/FranxurterTotallyMedium-gxwjp.ttf
Normal file
Binary file not shown.
21
Assets/Fonts/FranxurterTotallyMedium-gxwjp.ttf.meta
Normal file
21
Assets/Fonts/FranxurterTotallyMedium-gxwjp.ttf.meta
Normal file
@ -0,0 +1,21 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 2b8c3fce9287a0e499b95c5a3fb17529
|
||||
TrueTypeFontImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 4
|
||||
fontSize: 16
|
||||
forceTextureCase: -2
|
||||
characterSpacing: 0
|
||||
characterPadding: 1
|
||||
includeFontData: 1
|
||||
fontNames:
|
||||
- Franxurter Totally
|
||||
fallbackFontReferences: []
|
||||
customCharacters:
|
||||
fontRenderingMode: 0
|
||||
ascentCalculationMode: 1
|
||||
useLegacyBoundsCalculation: 0
|
||||
shouldRoundAdvanceValue: 1
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/IMG/Aseprite/sticknew.aseprite
Normal file
BIN
Assets/IMG/Aseprite/sticknew.aseprite
Normal file
Binary file not shown.
@ -1,8 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b7f5bf26418e324a69fbeb8e0fe04a16
|
||||
NativeFormatImporter:
|
||||
guid: 2736152c14d4c00f59746da3ca79601b
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 15600000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/IMG/sticknew.png
Normal file
BIN
Assets/IMG/sticknew.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
127
Assets/IMG/sticknew.png.meta
Normal file
127
Assets/IMG/sticknew.png.meta
Normal file
@ -0,0 +1,127 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d083508f90401fa6dac0392e42c5da76
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 0
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -86,15 +86,6 @@
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Charsheet",
|
||||
"type": "Button",
|
||||
"id": "d3e2f9b4-83df-4229-bdab-166ea722b672",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Inventory",
|
||||
"type": "Button",
|
||||
@ -333,39 +324,6 @@
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "c3215b19-e6e2-4b38-be31-cb78772547c0",
|
||||
"path": "<Keyboard>/c",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardMouse",
|
||||
"action": "Charsheet",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "198d5b2b-78fa-479f-8a06-ca71e1e8c914",
|
||||
"path": "<Gamepad>/buttonNorth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardMouse",
|
||||
"action": "Charsheet",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "99797d2f-fccb-4165-b1ee-3032683a3e21",
|
||||
"path": "<Gamepad>/buttonNorth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Controller",
|
||||
"action": "Charsheet",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "41d6126e-54e9-4ac3-9fd7-20ecf4db4eaa",
|
||||
@ -489,15 +447,6 @@
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Charsheet",
|
||||
"type": "Button",
|
||||
"id": "c46c052d-0d2e-483f-949b-d2a96f72c7f1",
|
||||
"expectedControlType": "Button",
|
||||
"processors": "",
|
||||
"interactions": "",
|
||||
"initialStateCheck": false
|
||||
},
|
||||
{
|
||||
"name": "Inventory",
|
||||
"type": "Button",
|
||||
@ -701,28 +650,6 @@
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "9f93a5f5-6762-48a6-8747-ee04a1833148",
|
||||
"path": "<Keyboard>/c",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "KeyboardMouse",
|
||||
"action": "Charsheet",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "af6d7d0a-ffde-4a66-a749-011dd678189b",
|
||||
"path": "<Gamepad>/buttonNorth",
|
||||
"interactions": "",
|
||||
"processors": "",
|
||||
"groups": "Controller",
|
||||
"action": "Charsheet",
|
||||
"isComposite": false,
|
||||
"isPartOfComposite": false
|
||||
},
|
||||
{
|
||||
"name": "",
|
||||
"id": "3876ad34-0e23-4436-bd5f-84c8411dee1a",
|
||||
|
||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -2,6 +2,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using System;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts
|
||||
{
|
||||
@ -29,7 +30,7 @@ namespace Assets.Scripts
|
||||
{
|
||||
gameObject.transform.parent.Find("Lid").GetComponent<Animator>().Play("ChestOpen");
|
||||
Item item;
|
||||
int luck = GameObject.Find("Player").GetComponent<Player>().getStats()[11];
|
||||
int luck = GameObject.Find("Player").GetComponent<PlayerGameObject>().getPlayerStat("Luck").getAmount();
|
||||
int type = new System.Random().Next(3);
|
||||
switch (type)
|
||||
{
|
||||
|
||||
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Classes
|
||||
{
|
||||
@ -25,7 +26,7 @@ namespace Assets.Scripts.Classes
|
||||
secondaryBonus = 0;
|
||||
}
|
||||
|
||||
public void applyBonus(Player player)
|
||||
public void applyBonus(PlayerObject player)
|
||||
{
|
||||
player.changeStats(strengthBonus, healthBonus, dexterityBonus, intelligenceBonus, secondaryBonus);
|
||||
}
|
||||
|
||||
@ -5,6 +5,7 @@ using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.UI;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
public class Controls : MonoBehaviour
|
||||
{
|
||||
@ -61,7 +62,7 @@ public class Controls : MonoBehaviour
|
||||
if(uihandler.state != UIState.GAME && playerInput.currentActionMap.name != "Menu"){
|
||||
playerInput.SwitchCurrentActionMap("Menu");
|
||||
}
|
||||
if (!player.GetComponent<Player>().takeDamage(0))
|
||||
if (!player.GetComponent<PlayerGameObject>().takeDamage(0))
|
||||
{
|
||||
if (!uihandler.isPlayerInFight())
|
||||
{
|
||||
@ -73,13 +74,13 @@ public class Controls : MonoBehaviour
|
||||
}
|
||||
|
||||
public void FixedUpdate(){
|
||||
if (!player.GetComponent<Player>().takeDamage(0))
|
||||
if (!player.GetComponent<PlayerGameObject>().takeDamage(0))
|
||||
{
|
||||
if (!uihandler.isPlayerInFight())
|
||||
{
|
||||
if (uihandler.canPlayerMove())
|
||||
{
|
||||
player.GetComponent<Player>().move(input);
|
||||
player.GetComponent<PlayerGameObject>().move(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -163,10 +164,6 @@ public class Controls : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void OnCharsheet(){
|
||||
uihandler.switchCharactersheet();
|
||||
}
|
||||
|
||||
public void OnInventory(){
|
||||
uihandler.switchInventory();
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Assets.Scripts;
|
||||
using Assets.Scripts.Player;
|
||||
using Assets.Scripts.Slimes;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections;
|
||||
@ -61,7 +62,7 @@ namespace Assets.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
public void scaleEnemy(Player player)
|
||||
public void scaleEnemy(PlayerGameObject player)
|
||||
{
|
||||
if (slime == null)
|
||||
{
|
||||
|
||||
@ -4,6 +4,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
public class Fight : MonoBehaviour
|
||||
{
|
||||
@ -18,7 +19,7 @@ public class Fight : MonoBehaviour
|
||||
this.tile = tile;
|
||||
this.enemy = enemy;
|
||||
this.player = player;
|
||||
enemy.GetComponent<Enemy>().scaleEnemy(player.GetComponent<Player>());
|
||||
enemy.GetComponent<Enemy>().scaleEnemy(player.GetComponent<PlayerGameObject>());
|
||||
enemy.transform.rotation = Quaternion.Euler(0,GameObject.Find("Main Camera").transform.rotation.y + 180f,0);
|
||||
|
||||
uihandler = GameObject.Find("UIHandler").GetComponent<UIHandler>();
|
||||
@ -46,7 +47,7 @@ public class Fight : MonoBehaviour
|
||||
//User waits
|
||||
break;
|
||||
case 3:
|
||||
playerDamage = player.GetComponent<Player>().calculateDamage();
|
||||
playerDamage = player.GetComponent<PlayerGameObject>().calculateDamage();
|
||||
break;
|
||||
case 4:
|
||||
skillnumber = 0;
|
||||
@ -60,10 +61,10 @@ public class Fight : MonoBehaviour
|
||||
}
|
||||
if (skillnumber != -1)
|
||||
{
|
||||
playerDamage = player.GetComponent<Player>().castSkill(skillnumber);
|
||||
playerDamage = player.GetComponent<PlayerGameObject>().castSkill(skillnumber);
|
||||
}
|
||||
player.GetComponent<Player>().reduceCooldown(skillnumber);
|
||||
player.GetComponent<Player>().regainSecondary();
|
||||
player.GetComponent<PlayerGameObject>().reduceCooldown(skillnumber);
|
||||
player.GetComponent<PlayerGameObject>().regainSecondary();
|
||||
bool isDead = enemy.GetComponent<Enemy>().takeDamage(playerDamage);
|
||||
if (isDead)
|
||||
{
|
||||
@ -73,8 +74,8 @@ public class Fight : MonoBehaviour
|
||||
}
|
||||
endFight();
|
||||
tile.GetComponent<Tile>().enemyKilled(enemy);
|
||||
player.GetComponent<Player>().enemyKilled();
|
||||
player.GetComponent<Player>().gainExperience(enemy.GetComponent<Enemy>().getExperience());
|
||||
player.GetComponent<PlayerGameObject>().enemyKilled();
|
||||
player.GetComponent<PlayerGameObject>().gainExperience(enemy.GetComponent<Enemy>().getExperience());
|
||||
GameObject.Find("Inventory").GetComponent<Inventory>().addItem(enemy.GetComponent<Enemy>().getItem());
|
||||
GameObject.Find("QuestLog").GetComponent<QuestLog>().updateQuests("kill", enemy, 1);
|
||||
}
|
||||
@ -110,7 +111,7 @@ public class Fight : MonoBehaviour
|
||||
break;
|
||||
}
|
||||
|
||||
if (player.GetComponent<Player>().takeDamage(enemyDamage))
|
||||
if (player.GetComponent<PlayerGameObject>().takeDamage(enemyDamage))
|
||||
{
|
||||
SteamWorksHandler.getStandardAchievement("DeathAchievement");
|
||||
uihandler.showDeathScreen();
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Assets.Scripts.Player;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
@ -9,7 +10,7 @@ namespace Assets.Scripts
|
||||
public class ButtonHandler : MonoBehaviour
|
||||
{
|
||||
UIHandler uihandler;
|
||||
Player player;
|
||||
PlayerGameObject player;
|
||||
AudioHandler audioHandler;
|
||||
WorldGenerator worldGenerator;
|
||||
GameObject fight;
|
||||
@ -17,7 +18,7 @@ namespace Assets.Scripts
|
||||
private void Start()
|
||||
{
|
||||
uihandler = GameObject.Find("UIHandler").GetComponent<UIHandler>();
|
||||
player = GameObject.Find("Player").GetComponent<Player>();
|
||||
player = GameObject.Find("Player").GetComponent<PlayerGameObject>();
|
||||
worldGenerator = GameObject.Find("WorldGenerator").GetComponent<WorldGenerator>();
|
||||
audioHandler = GameObject.Find("AudioHandler").GetComponent<AudioHandler>();
|
||||
fight = GameObject.Find("Fight");
|
||||
@ -98,12 +99,6 @@ namespace Assets.Scripts
|
||||
uihandler.startGame();
|
||||
}
|
||||
|
||||
public void switchCharactersheet()
|
||||
{
|
||||
audioHandler.playButtonClick();
|
||||
uihandler.switchCharactersheet();
|
||||
}
|
||||
|
||||
public void switchQuestlog()
|
||||
{
|
||||
audioHandler.playButtonClick();
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Steamworks;
|
||||
using Assets.Scripts.Player;
|
||||
using Steamworks;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -10,7 +11,7 @@ namespace Assets.Scripts
|
||||
{
|
||||
class EasterEggHandler
|
||||
{
|
||||
public static void applyEasterEgg(Player player)
|
||||
public static void applyEasterEgg(PlayerObject player)
|
||||
{
|
||||
if (player.getPlayerName().ToLower().Length > 0)
|
||||
{
|
||||
@ -18,10 +19,10 @@ namespace Assets.Scripts
|
||||
}
|
||||
}
|
||||
|
||||
private static void applyNameEasterEgg(Player player)
|
||||
private static void applyNameEasterEgg(PlayerObject player)
|
||||
{
|
||||
//maxHealth, maxSecondary, strength, dexterity, intelligence
|
||||
int[] result = new int[5];
|
||||
/*int[] result = new int[5];
|
||||
int[] stats = player.getStats();
|
||||
switch (player.getPlayerName().ToLower())
|
||||
{
|
||||
@ -62,10 +63,12 @@ namespace Assets.Scripts
|
||||
result[4] = stats[6];
|
||||
break;
|
||||
}
|
||||
player.setStats(result);
|
||||
player.setStats(result);*/
|
||||
|
||||
//TODO FIX whole Easteregg mechanic to go with the new player
|
||||
}
|
||||
|
||||
public static bool isGodMode(Player player)
|
||||
public static bool isGodMode(PlayerObject player)
|
||||
{
|
||||
bool result = false;
|
||||
if (player != null)
|
||||
|
||||
@ -9,6 +9,7 @@ using UnityEngine.UI;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UnityEngine.Localization.Settings;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts
|
||||
{
|
||||
@ -24,7 +25,7 @@ namespace Assets.Scripts
|
||||
sw.Close();
|
||||
}
|
||||
|
||||
public static void loadGame(Player player, WorldGenerator worldGenerator, Inventory inventory, QuestLog questLog)
|
||||
public static void loadGame(PlayerGameObject player, WorldGenerator worldGenerator, Inventory inventory, QuestLog questLog)
|
||||
{
|
||||
if (hasSaveFile())
|
||||
{
|
||||
|
||||
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Steamworks;
|
||||
using Assets.Scripts;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
public class SteamWorksHandler : MonoBehaviour
|
||||
{
|
||||
@ -97,7 +98,7 @@ public class SteamWorksHandler : MonoBehaviour
|
||||
|
||||
private static bool isGodMode()
|
||||
{
|
||||
return EasterEggHandler.isGodMode(GameObject.Find("Player").GetComponent<Player>());
|
||||
return EasterEggHandler.isGodMode(GameObject.Find("Player").GetComponent<PlayerGameObject>().getPlayer());
|
||||
}
|
||||
|
||||
public static void getItemAchievement(Item item)
|
||||
|
||||
@ -3,19 +3,20 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UnityEngine.EventSystems;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts
|
||||
{
|
||||
public class TooltipHandler : MonoBehaviour
|
||||
{
|
||||
public GameObject tooltip;
|
||||
Player player;
|
||||
PlayerGameObject player;
|
||||
UIHandler uihandler;
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
player = GameObject.Find("Player").GetComponent<Player>();
|
||||
player = GameObject.Find("Player").GetComponent<PlayerGameObject>();
|
||||
uihandler = GameObject.Find("UIHandler").GetComponent<UIHandler>();
|
||||
}
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Assets.Scripts.Classes;
|
||||
using Assets.Scripts.Player;
|
||||
using Assets.Scripts.Races;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@ -15,7 +16,6 @@ namespace Assets.Scripts
|
||||
public GameObject information;
|
||||
public GameObject fight;
|
||||
public GameObject message;
|
||||
public GameObject charactersheet;
|
||||
public GameObject deathscreen;
|
||||
public GameObject options;
|
||||
public GameObject pauseMenu;
|
||||
@ -33,6 +33,7 @@ namespace Assets.Scripts
|
||||
void Start()
|
||||
{
|
||||
FileHandler.loadOptions(true);
|
||||
GameObject.Find("Player").GetComponent<PlayerGameObject>().getPlayerStat("Killcount").changeAmount(1);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
@ -75,7 +76,7 @@ namespace Assets.Scripts
|
||||
|
||||
private void updatePlayerHUD()
|
||||
{
|
||||
updateHUD(GameObject.Find("Player").GetComponent<Player>());
|
||||
updateHUD(GameObject.Find("Player").GetComponent<PlayerGameObject>());
|
||||
}
|
||||
|
||||
public bool canPlayerMove()
|
||||
@ -110,18 +111,6 @@ namespace Assets.Scripts
|
||||
EventSystem.current.SetSelectedGameObject(GameObject.Find("btnCloseTutorial"));
|
||||
}
|
||||
|
||||
public void switchCharactersheet()
|
||||
{
|
||||
if (state == UIState.CHARACTER)
|
||||
{
|
||||
closeCharactersheet();
|
||||
}
|
||||
else
|
||||
{
|
||||
openCharactersheet();
|
||||
}
|
||||
}
|
||||
|
||||
public void openOptions()
|
||||
{
|
||||
FileHandler.loadOptionDisplay();
|
||||
@ -137,22 +126,6 @@ namespace Assets.Scripts
|
||||
openPauseMenu();
|
||||
}
|
||||
|
||||
public void openCharactersheet()
|
||||
{
|
||||
hideOtherElements(charactersheet);
|
||||
state = UIState.CHARACTER;
|
||||
if(GameObject.Find("btnStrengthIncrease").transform.localScale != new Vector3(0,0,0)){
|
||||
EventSystem.current.SetSelectedGameObject(GameObject.Find("btnStrengthIncrease"));
|
||||
}
|
||||
}
|
||||
|
||||
public void closeCharactersheet()
|
||||
{
|
||||
charactersheet.transform.localScale = new Vector3(0, 0, 0);
|
||||
showHUD();
|
||||
state = UIState.GAME;
|
||||
}
|
||||
|
||||
public void switchInventory()
|
||||
{
|
||||
if (state == UIState.INVENTORY)
|
||||
@ -373,38 +346,36 @@ namespace Assets.Scripts
|
||||
|
||||
public void updateFightInterface(GameObject enemy, GameObject player)
|
||||
{
|
||||
updateFightInterfacePlayer(player);
|
||||
updateFightInterfacePlayer(player.GetComponent<PlayerGameObject>());
|
||||
updateFightInterfaceEnemy(enemy);
|
||||
updateFightInterfaceActions(player);
|
||||
updateFightInterfaceActions(player.GetComponent<PlayerGameObject>());
|
||||
GameObject.Find("txtRounds").GetComponent<Text>().text = (int.Parse(GameObject.Find("txtRounds").GetComponent<Text>().text) + 1).ToString();
|
||||
}
|
||||
|
||||
private void updateFightInterfaceActions(GameObject player)
|
||||
private void updateFightInterfaceActions(PlayerGameObject player)
|
||||
{
|
||||
GameObject actionFour = GameObject.Find("btnActionFour");
|
||||
GameObject actionFive = GameObject.Find("btnActionFive");
|
||||
GameObject actionSix = GameObject.Find("btnActionSix");
|
||||
|
||||
player.GetComponent<Player>().displayAction(0, actionFour.transform.Find("imgAction").gameObject, actionFour.transform.Find("descAction").gameObject);
|
||||
player.GetComponent<Player>().displayAction(1, actionFive.transform.Find("imgAction").gameObject, actionFive.transform.Find("descAction").gameObject);
|
||||
player.GetComponent<Player>().displayAction(2, actionSix.transform.Find("imgAction").gameObject, actionSix.transform.Find("descAction").gameObject);
|
||||
player.displayAction(0, actionFour.transform.Find("imgAction").gameObject, actionFour.transform.Find("descAction").gameObject);
|
||||
player.displayAction(1, actionFive.transform.Find("imgAction").gameObject, actionFive.transform.Find("descAction").gameObject);
|
||||
player.displayAction(2, actionSix.transform.Find("imgAction").gameObject, actionSix.transform.Find("descAction").gameObject);
|
||||
}
|
||||
|
||||
private void updateFightInterfacePlayer(GameObject player)
|
||||
private void updateFightInterfacePlayer(PlayerGameObject player)
|
||||
{
|
||||
// { health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence };
|
||||
int[] playerStats = player.GetComponent<Player>().getStats();
|
||||
Dictionary<string, int> equipment = inventory.GetComponent<Inventory>().getEquipmentBonus();
|
||||
|
||||
GameObject foreground = GameObject.Find("healthForegroundPlayer");
|
||||
GameObject background = GameObject.Find("healthBackgroundPlayer");
|
||||
GameObject text = GameObject.Find("healthTextPlayer");
|
||||
updateBar(foreground, background, text, playerStats[1] + equipment["HP"], playerStats[0]);
|
||||
updateBar(foreground, background, text, player.getPlayerStat("MaxHealth").getAmount() + equipment["HP"], player.getPlayerStat("Health").getAmount());
|
||||
|
||||
foreground = GameObject.Find("secondaryForegroundPlayer");
|
||||
background = GameObject.Find("secondaryBackgroundPlayer");
|
||||
text = GameObject.Find("secondaryTextPlayer");
|
||||
updateBar(foreground, background, text, playerStats[3] + equipment["MP"], playerStats[2]);
|
||||
updateBar(foreground, background, text, player.getPlayerStat("MaxSecondary").getAmount() + equipment["MP"], player.getPlayerStat("Secondary").getAmount());
|
||||
}
|
||||
|
||||
private void updateFightInterfaceEnemy(GameObject enemy)
|
||||
@ -423,24 +394,22 @@ namespace Assets.Scripts
|
||||
updateBar(foreground, background, text, enemyStats[3], enemyStats[2]);
|
||||
}
|
||||
|
||||
public void adjustInformation(Player player)
|
||||
public void adjustInformation(PlayerGameObject player)
|
||||
{
|
||||
// { health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence, level, experience, maxExperience, points};
|
||||
int[] playerStats = player.GetComponent<Player>().getStats();
|
||||
Dictionary<string, int> equipment = inventory.GetComponent<Inventory>().getEquipmentBonus();
|
||||
|
||||
GameObject.Find("txtStrength").GetComponent<Text>().text = "STR: " + playerStats[4] + " (+" + equipment["STR"] + ")";
|
||||
GameObject.Find("txtDexterity").GetComponent<Text>().text = "DEX: " + playerStats[5] + " (+" + equipment["DEX"] + ")";
|
||||
GameObject.Find("txtIntelligence").GetComponent<Text>().text = "INT: " + playerStats[6] + " (+" + equipment["INT"] + ")";
|
||||
GameObject.Find("txtHealth").GetComponent<Text>().text = TextHandler.getText("health") + " " + playerStats[1] + " (+" + equipment["HP"] + ")";
|
||||
GameObject.Find("txtSecondary").GetComponent<Text>().text = "Mana: " + playerStats[3] + " (+" + equipment["MP"] + ")";
|
||||
GameObject.Find("txtStrength").GetComponent<Text>().text = "STR: " + player.getPlayerStat("Strength").getAmount() + " (+" + equipment["STR"] + ")";
|
||||
GameObject.Find("txtDexterity").GetComponent<Text>().text = "DEX: " + player.getPlayerStat("Dexterity").getAmount() + " (+" + equipment["DEX"] + ")";
|
||||
GameObject.Find("txtIntelligence").GetComponent<Text>().text = "INT: " + player.getPlayerStat("Intelligence").getAmount() + " (+" + equipment["INT"] + ")";
|
||||
GameObject.Find("txtHealth").GetComponent<Text>().text = TextHandler.getText("health") + " " + player.getPlayerStat("Health").getAmount() + " (+" + equipment["HP"] + ")";
|
||||
GameObject.Find("txtSecondary").GetComponent<Text>().text = "Mana: " + player.getPlayerStat("Secondary").getAmount() + " (+" + equipment["MP"] + ")";
|
||||
|
||||
updateHealthUI(playerStats[0], playerStats[1] + equipment["HP"]);
|
||||
updateSecondaryUI(playerStats[2], playerStats[3] + equipment["MP"]);
|
||||
updateExperienceUI(playerStats[8], playerStats[9]);
|
||||
updateHealthUI(player.getPlayerStat("Health").getAmount(), player.getPlayerStat("MaxHealth").getAmount() + equipment["HP"]);
|
||||
updateSecondaryUI(player.getPlayerStat("Secondary").getAmount(), player.getPlayerStat("MaxSecondary").getAmount() + equipment["MP"]);
|
||||
updateExperienceUI(player.getPlayerStat("Experience").getAmount(), player.getPlayerStat("MaxExperience").getAmount());
|
||||
|
||||
player.updateName(GameObject.Find("txtName").GetComponent<Text>());
|
||||
updatePoints(playerStats[10]);
|
||||
updatePoints(player.getPlayerStat("Points").getAmount());
|
||||
player.displaySkills(GameObject.Find("pnlSkills"));
|
||||
}
|
||||
|
||||
@ -496,20 +465,18 @@ namespace Assets.Scripts
|
||||
updateFill(fill, null, maxExperience, experience);
|
||||
}
|
||||
|
||||
public void updateHUD(Player player)
|
||||
public void updateHUD(PlayerGameObject player)
|
||||
{
|
||||
// { health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence, level, experience, maxExperience};
|
||||
int[] playerStats = player.GetComponent<Player>().getStats();
|
||||
Dictionary<string, int> equipment = inventory.GetComponent<Inventory>().getEquipmentBonus();
|
||||
|
||||
GameObject information = GameObject.Find("txtInformationHUD");
|
||||
player.updateNameHUD(information.GetComponent<Text>());
|
||||
|
||||
GameObject fill = GameObject.Find("HUD_healthFill");
|
||||
updateFill(fill, null, playerStats[1] + equipment["HP"], playerStats[0]);
|
||||
updateFill(fill, null, player.getPlayerStat("MaxHealth").getAmount() + equipment["HP"], player.getPlayerStat("Health").getAmount());
|
||||
|
||||
fill = GameObject.Find("HUD_secondaryFill");
|
||||
updateFill(fill, null, playerStats[3] + equipment["MP"], playerStats[2]);
|
||||
updateFill(fill, null, player.getPlayerStat("MaxSecondary").getAmount() + equipment["MP"], player.getPlayerStat("Secondary").getAmount());
|
||||
}
|
||||
|
||||
public void updateBar(GameObject bar, GameObject barBackground, GameObject textField, int maxValue, int minValue)
|
||||
@ -552,15 +519,14 @@ namespace Assets.Scripts
|
||||
if (PlayerPrefs.GetInt("isLoad") == 0)
|
||||
{
|
||||
GameObject.Find("WorldGenerator").GetComponent<WorldGenerator>().resetGame(PlayerPrefs.GetInt("cityAmount"));
|
||||
GameObject.Find("Player").GetComponent<Player>().generatePlayer();
|
||||
GameObject.Find("Player").GetComponent<Player>().finishPlayerCreation();
|
||||
GameObject.Find("Player").GetComponent<PlayerGameObject>().generatePlayer();
|
||||
hideOtherElements(introduction);
|
||||
state = UIState.INTRODUCTION;
|
||||
EventSystem.current.SetSelectedGameObject(GameObject.Find("btnClose"));
|
||||
}
|
||||
else
|
||||
{
|
||||
FileHandler.loadGame(GameObject.Find("Player").GetComponent<Player>(), GameObject.Find("WorldGenerator").GetComponent<WorldGenerator>(), GameObject.Find("Inventory").GetComponent<Inventory>(), GameObject.Find("QuestLog").GetComponent<QuestLog>());
|
||||
FileHandler.loadGame(GameObject.Find("Player").GetComponent<PlayerGameObject>(), GameObject.Find("WorldGenerator").GetComponent<WorldGenerator>(), GameObject.Find("Inventory").GetComponent<Inventory>(), GameObject.Find("QuestLog").GetComponent<QuestLog>());
|
||||
hideOtherElements(introduction);
|
||||
introduction.transform.localScale = new Vector3(0, 0, 0);
|
||||
tutorial.transform.localScale = new Vector3(0,0,0);
|
||||
|
||||
@ -12,7 +12,6 @@ namespace Assets.Scripts
|
||||
{
|
||||
public GameObject head;
|
||||
public GameObject chest;
|
||||
public GameObject shoulders;
|
||||
public GameObject feet;
|
||||
public GameObject ring;
|
||||
public GameObject amulet;
|
||||
@ -135,7 +134,7 @@ namespace Assets.Scripts
|
||||
{
|
||||
GameObject slot = head;
|
||||
Item item;
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
@ -155,12 +154,9 @@ namespace Assets.Scripts
|
||||
slot = feet;
|
||||
break;
|
||||
case 5:
|
||||
slot = shoulders;
|
||||
break;
|
||||
case 6:
|
||||
slot = chest;
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
slot = ring;
|
||||
break;
|
||||
}
|
||||
@ -196,7 +192,7 @@ namespace Assets.Scripts
|
||||
{
|
||||
createStatBoost();
|
||||
GameObject equip = head;
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
@ -216,12 +212,9 @@ namespace Assets.Scripts
|
||||
equip = feet;
|
||||
break;
|
||||
case 5:
|
||||
equip = shoulders;
|
||||
break;
|
||||
case 6:
|
||||
equip = chest;
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
equip = ring;
|
||||
break;
|
||||
}
|
||||
@ -240,7 +233,7 @@ namespace Assets.Scripts
|
||||
GameObject equip = head;
|
||||
string slotname = "";
|
||||
result = result + "\"equipment\": {\r\n";
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
@ -265,14 +258,10 @@ namespace Assets.Scripts
|
||||
slotname = "feet";
|
||||
break;
|
||||
case 5:
|
||||
equip = shoulders;
|
||||
slotname = "shoulders";
|
||||
break;
|
||||
case 6:
|
||||
equip = chest;
|
||||
slotname = "chest";
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
equip = ring;
|
||||
slotname = "ring";
|
||||
break;
|
||||
@ -337,7 +326,7 @@ namespace Assets.Scripts
|
||||
{
|
||||
GameObject equip = head;
|
||||
string slotname = "";
|
||||
for (int i = 0; i < 8; i++)
|
||||
for (int i = 0; i < 7; i++)
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
@ -362,14 +351,10 @@ namespace Assets.Scripts
|
||||
slotname = "feet";
|
||||
break;
|
||||
case 5:
|
||||
equip = shoulders;
|
||||
slotname = "shoulders";
|
||||
break;
|
||||
case 6:
|
||||
equip = chest;
|
||||
slotname = "chest";
|
||||
break;
|
||||
case 7:
|
||||
case 6:
|
||||
equip = ring;
|
||||
slotname = "ring";
|
||||
break;
|
||||
@ -407,9 +392,6 @@ namespace Assets.Scripts
|
||||
case ItemPlace.HELMET:
|
||||
equipSlot = head.GetComponent<InventorySlot>();
|
||||
break;
|
||||
case ItemPlace.SHOULDER:
|
||||
equipSlot = shoulders.GetComponent<InventorySlot>();
|
||||
break;
|
||||
case ItemPlace.BOOTS:
|
||||
equipSlot = feet.GetComponent<InventorySlot>();
|
||||
break;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
using Assets.Scripts.Player;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@ -139,10 +140,11 @@ namespace Assets.Scripts
|
||||
switch (place)
|
||||
{
|
||||
case ItemPlace.LEFTHAND:
|
||||
image = Resources.Load<Texture>("Equipment/" + GameObject.Find("Player").GetComponent<Player>().getClass().classname + "/Inv_LeftHand");
|
||||
Debug.Log(GameObject.Find("Player").GetComponent<PlayerGameObject>().getClass().classname);
|
||||
image = Resources.Load<Texture>("Equipment/" + GameObject.Find("Player").GetComponent<PlayerGameObject>().getClass().classname + "/Inv_LeftHand");
|
||||
break;
|
||||
case ItemPlace.RIGHTHAND:
|
||||
image = Resources.Load<Texture>("Equipment/" + GameObject.Find("Player").GetComponent<Player>().getClass().classname + "/Inv_RightHand");
|
||||
image = Resources.Load<Texture>("Equipment/" + GameObject.Find("Player").GetComponent<PlayerGameObject>().getClass().classname + "/Inv_RightHand");
|
||||
break;
|
||||
case ItemPlace.HELMET:
|
||||
image = Resources.Load<Texture>("Equipment/Inv_Helmet");
|
||||
@ -150,9 +152,6 @@ namespace Assets.Scripts
|
||||
case ItemPlace.BOOTS:
|
||||
image = Resources.Load<Texture>("Equipment/Inv_Boots");
|
||||
break;
|
||||
case ItemPlace.SHOULDER:
|
||||
image = Resources.Load<Texture>("Equipment/Inv_Shoulders");
|
||||
break;
|
||||
case ItemPlace.AMULET:
|
||||
image = Resources.Load<Texture>("Equipment/Inv_Amulet");
|
||||
break;
|
||||
@ -195,6 +194,9 @@ namespace Assets.Scripts
|
||||
}
|
||||
else
|
||||
{
|
||||
if(equip == null){
|
||||
return result;
|
||||
}
|
||||
result = result + equip.saveGame();
|
||||
}
|
||||
return result;
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
using Assets.Scripts.Player;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
@ -82,7 +83,7 @@ namespace Assets.Scripts
|
||||
string replacement = "";
|
||||
if (place == ItemPlace.LEFTHAND)
|
||||
{
|
||||
switch (GameObject.Find("Player").GetComponent<Player>().getClass().classname)
|
||||
switch (GameObject.Find("Player").GetComponent<PlayerGameObject>().getClass().classname)
|
||||
{
|
||||
case "Warrior":
|
||||
replacement = "Greatshield";
|
||||
@ -97,7 +98,7 @@ namespace Assets.Scripts
|
||||
}
|
||||
else if (place == ItemPlace.RIGHTHAND)
|
||||
{
|
||||
switch (GameObject.Find("Player").GetComponent<Player>().getClass().classname)
|
||||
switch (GameObject.Find("Player").GetComponent<PlayerGameObject>().getClass().classname)
|
||||
{
|
||||
case "Warrior":
|
||||
replacement = "Sword";
|
||||
@ -275,10 +276,10 @@ namespace Assets.Scripts
|
||||
switch (place)
|
||||
{
|
||||
case ItemPlace.LEFTHAND:
|
||||
image = Resources.Load<Texture>("Equipment/" + GameObject.Find("Player").GetComponent<Player>().getClass().classname + "/Inv_LeftHand");
|
||||
image = Resources.Load<Texture>("Equipment/" + GameObject.Find("Player").GetComponent<PlayerGameObject>().getClass().classname + "/Inv_LeftHand");
|
||||
break;
|
||||
case ItemPlace.RIGHTHAND:
|
||||
image = Resources.Load<Texture>("Equipment/" + GameObject.Find("Player").GetComponent<Player>().getClass().classname + "/Inv_RightHand");
|
||||
image = Resources.Load<Texture>("Equipment/" + GameObject.Find("Player").GetComponent<PlayerGameObject>().getClass().classname + "/Inv_RightHand");
|
||||
break;
|
||||
case ItemPlace.HELMET:
|
||||
image = Resources.Load<Texture>("Equipment/Inv_Helmet");
|
||||
@ -286,9 +287,6 @@ namespace Assets.Scripts
|
||||
case ItemPlace.BOOTS:
|
||||
image = Resources.Load<Texture>("Equipment/Inv_Boots");
|
||||
break;
|
||||
case ItemPlace.SHOULDER:
|
||||
image = Resources.Load<Texture>("Equipment/Inv_Shoulders");
|
||||
break;
|
||||
case ItemPlace.AMULET:
|
||||
image = Resources.Load<Texture>("Equipment/Inv_Amulet");
|
||||
break;
|
||||
|
||||
@ -9,7 +9,6 @@ namespace Assets.Scripts
|
||||
public enum ItemPlace
|
||||
{
|
||||
HELMET,
|
||||
SHOULDER,
|
||||
RIGHTHAND,
|
||||
LEFTHAND,
|
||||
RING,
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Assets.Scripts.Classes;
|
||||
using Assets.Scripts.Player;
|
||||
using Assets.Scripts.Races;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@ -91,7 +92,7 @@ namespace Assets.Scripts.Menu
|
||||
playerRace = new GiantRace();
|
||||
break;
|
||||
}
|
||||
GameObject.Find("Player").GetComponent<Player>().generatePlayer(playerRace, playerClass, name, GameObject.Find("dropDifficulty").GetComponent<Dropdown>().value);
|
||||
GameObject.Find("Player").GetComponent<PlayerGameObject>().generatePlayer(playerRace, playerClass, name, GameObject.Find("dropDifficulty").GetComponent<Dropdown>().value);
|
||||
}
|
||||
|
||||
public void openCharacterCreation()
|
||||
@ -192,13 +193,13 @@ namespace Assets.Scripts.Menu
|
||||
setPlayerInformation();
|
||||
|
||||
// health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence, level, experience, maxExperience, points
|
||||
int[] playerstats = GameObject.Find("Player").GetComponent<Player>().getStats();
|
||||
PlayerGameObject player = GameObject.Find("Player").GetComponent<PlayerGameObject>();
|
||||
|
||||
GameObject.Find("txtStrength_Creation").GetComponent<Text>().text = TextHandler.getText("strength") + " " + playerstats[4];
|
||||
GameObject.Find("txtDexterity_Creation").GetComponent<Text>().text = TextHandler.getText("dexterity") + " " + playerstats[5];
|
||||
GameObject.Find("txtIntelligence_Creation").GetComponent<Text>().text = TextHandler.getText("intelligence") + " " + playerstats[6];
|
||||
GameObject.Find("txtHealth_Creation").GetComponent<Text>().text = TextHandler.getText("health") + " " + playerstats[1];
|
||||
GameObject.Find("txtSecondary_Creation").GetComponent<Text>().text = "Mana: " + playerstats[3];
|
||||
GameObject.Find("txtStrength_Creation").GetComponent<Text>().text = TextHandler.getText("strength") + " " + player.getPlayerStat("Strength").getAmount();
|
||||
GameObject.Find("txtDexterity_Creation").GetComponent<Text>().text = TextHandler.getText("dexterity") + " " + player.getPlayerStat("Dexterity").getAmount();
|
||||
GameObject.Find("txtIntelligence_Creation").GetComponent<Text>().text = TextHandler.getText("intelligence") + " " + player.getPlayerStat("Intelligence").getAmount();
|
||||
GameObject.Find("txtHealth_Creation").GetComponent<Text>().text = TextHandler.getText("health") + " " + player.getPlayerStat("MaxHealth").getAmount();
|
||||
GameObject.Find("txtSecondary_Creation").GetComponent<Text>().text = "Mana: " + player.getPlayerStat("MaxSecondary").getAmount();
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -1,731 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Assets.Scripts.Classes;
|
||||
using Assets.Scripts.Races;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Assets.Scripts
|
||||
{
|
||||
public class Player : MonoBehaviour
|
||||
{
|
||||
public float speed = 5f;
|
||||
System.Random rand = new System.Random();
|
||||
DateTime now;
|
||||
UIHandler uihandler;
|
||||
AudioHandler audioHandler;
|
||||
WorldGenerator worldGenerator;
|
||||
int bobbingDirection = -1;
|
||||
|
||||
string playername;
|
||||
int health;
|
||||
int maxHealth;
|
||||
int maxSecondary;
|
||||
int secondary;
|
||||
int strength;
|
||||
int dexterity;
|
||||
int intelligence;
|
||||
int level;
|
||||
int luck;
|
||||
int experience;
|
||||
int maxExperience;
|
||||
int healthRegen;
|
||||
int secondaryRegen;
|
||||
BasicRace race;
|
||||
BasicClass role;
|
||||
BasicSkill[] skills = new BasicSkill[3];
|
||||
int points = 0;
|
||||
bool isDodging = false;
|
||||
DateTime jumpTimer;
|
||||
|
||||
int killcount = -1;
|
||||
int difficulty = 0;
|
||||
Dictionary<string, int> equipment;
|
||||
bool finishedGame = false;
|
||||
|
||||
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
SceneHandler.switchGameToMenu();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
void Start()
|
||||
{
|
||||
uihandler = GameObject.Find("UIHandler").GetComponent<UIHandler>();
|
||||
audioHandler = GameObject.Find("AudioHandler").GetComponent<AudioHandler>();
|
||||
|
||||
if (GameObject.Find("Inventory") != null)
|
||||
{
|
||||
equipment = GameObject.Find("Inventory").GetComponent<Inventory>().getEquipmentBonus();
|
||||
}
|
||||
if (GameObject.Find("WorldGenerator") != null)
|
||||
{
|
||||
worldGenerator = GameObject.Find("WorldGenerator").GetComponent<WorldGenerator>();
|
||||
}
|
||||
}
|
||||
|
||||
public void finishPlayerCreation()
|
||||
{
|
||||
killcount = 0;
|
||||
generateSkills();
|
||||
EasterEggHandler.applyEasterEgg(this);
|
||||
}
|
||||
|
||||
public void generatePlayer(BasicRace race, BasicClass role, string name, int difficulty)
|
||||
{
|
||||
playername = name;
|
||||
health = 100;
|
||||
maxHealth = 100;
|
||||
maxSecondary = 20;
|
||||
secondary = 20;
|
||||
strength = 5;
|
||||
dexterity = 5;
|
||||
intelligence = 5;
|
||||
experience = 0;
|
||||
maxExperience = 10;
|
||||
healthRegen = 30 / (difficulty + 1);
|
||||
secondaryRegen = 5;
|
||||
level = 0;
|
||||
luck = 20 - (difficulty * 5);
|
||||
this.race = race;
|
||||
this.race.applyBonus(this);
|
||||
this.role = role;
|
||||
this.role.applyBonus(this);
|
||||
this.difficulty = difficulty;
|
||||
}
|
||||
|
||||
public void generatePlayer()
|
||||
{
|
||||
switch (PlayerPrefs.GetInt("class"))
|
||||
{
|
||||
case 0:
|
||||
role = new WarriorClass();
|
||||
break;
|
||||
case 1:
|
||||
role = new MageClass();
|
||||
break;
|
||||
case 2:
|
||||
role = new ThiefClass();
|
||||
break;
|
||||
}
|
||||
switch (PlayerPrefs.GetInt("race"))
|
||||
{
|
||||
case 0:
|
||||
race = new HumanRace();
|
||||
break;
|
||||
case 1:
|
||||
race = new ElvenRace();
|
||||
break;
|
||||
case 2:
|
||||
race = new DwarvenRace();
|
||||
break;
|
||||
case 3:
|
||||
race = new GoblinRace();
|
||||
break;
|
||||
case 4:
|
||||
race = new GiantRace();
|
||||
break;
|
||||
}
|
||||
playername = PlayerPrefs.GetString("playername");
|
||||
health = 100;
|
||||
maxHealth = 100;
|
||||
maxSecondary = 20;
|
||||
secondary = 20;
|
||||
strength = 5;
|
||||
dexterity = 5;
|
||||
intelligence = 5;
|
||||
experience = 0;
|
||||
maxExperience = 10;
|
||||
healthRegen = 30 / (difficulty + 1);
|
||||
secondaryRegen = 5;
|
||||
level = 0;
|
||||
luck = 20 - (difficulty * 5);
|
||||
this.race.applyBonus(this);
|
||||
this.role.applyBonus(this);
|
||||
this.difficulty = PlayerPrefs.GetInt("difficulty");
|
||||
}
|
||||
|
||||
private void generateSkills()
|
||||
{
|
||||
switch (role.classname)
|
||||
{
|
||||
case "Warrior":
|
||||
skills[0] = new BasicSkill(20, 10, 2, "Slash", "Skills/Warrior/Slash", null);
|
||||
skills[0].setDescription(TextHandler.getText("slashDesc"));//"");
|
||||
skills[1] = new BasicSkill(0, 5, 1, "Block", "Skills/Warrior/Block", null);
|
||||
skills[1].setDescription(TextHandler.getText("blockDesc"));//"");
|
||||
skills[2] = new BasicSkill(35, 30, 4, "Execution", "Skills/Warrior/Execution", null);
|
||||
skills[2].setDescription(TextHandler.getText("executionDesc"));//"");
|
||||
break;
|
||||
case "Thief":
|
||||
skills[0] = new BasicSkill(20, 10, 2, "Stab", "Skills/Thief/Stab", null);
|
||||
skills[0].setDescription(TextHandler.getText("stabDesc"));//"");
|
||||
skills[1] = new BasicSkill(0, 5, 1, "SmokeScreen", "Skills/Thief/SmokeScreen", null);
|
||||
skills[1].setDescription(TextHandler.getText("smokeScreenDesc"));//"");
|
||||
skills[2] = new BasicSkill(35, 30, 4, "Heartstop", "Skills/Thief/Heartstop", null);
|
||||
skills[2].setDescription(TextHandler.getText("heartStopDesc"));//"");
|
||||
break;
|
||||
case "Mage":
|
||||
skills[0] = new BasicSkill(20, 10, 2, "Icicle", "Skills/Mage/Icicle", null);
|
||||
skills[0].setDescription(TextHandler.getText("icicleDesc"));//"");
|
||||
skills[1] = new BasicSkill(0, 5, 1, "Teleport", "Skills/Mage/Teleport", null);
|
||||
skills[1].setDescription(TextHandler.getText("teleportDesc"));//"");
|
||||
skills[2] = new BasicSkill(35, 30, 4, "Fireball", "Skills/Mage/Fireball", null);
|
||||
skills[2].setDescription(TextHandler.getText("fireballDesc"));//"");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void changeStats(int strength, int health, int dexterity, int intelligence, int secondary)
|
||||
{
|
||||
this.maxHealth = this.maxHealth + health;
|
||||
this.health = maxHealth;
|
||||
this.maxSecondary = this.maxSecondary + secondary;
|
||||
this.secondary = maxSecondary;
|
||||
this.strength = this.strength + strength;
|
||||
this.dexterity = this.dexterity + dexterity;
|
||||
this.intelligence = this.intelligence + intelligence;
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (killcount != -1)
|
||||
{
|
||||
getRotation();
|
||||
regeneratePlayer();
|
||||
uihandler.adjustInformation(this);
|
||||
if (!finishedGame)
|
||||
{
|
||||
gameFinished();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void regeneratePlayer()
|
||||
{
|
||||
if (uihandler.state != UIState.FIGHT)
|
||||
{
|
||||
if (now == null)
|
||||
{
|
||||
now = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (now.AddSeconds(10).CompareTo(DateTime.Now) <= 0)
|
||||
{
|
||||
now = DateTime.Now;
|
||||
regainSecondary();
|
||||
healPlayer();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
now = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
public void regainSecondary()
|
||||
{
|
||||
secondary = secondary + secondaryRegen + equipment["MPR"];
|
||||
if (secondary >= maxSecondary + equipment["MP"])
|
||||
{
|
||||
secondary = maxSecondary + equipment["MP"];
|
||||
}
|
||||
}
|
||||
|
||||
private void healPlayer()
|
||||
{
|
||||
health = health + healthRegen + equipment["HPR"];
|
||||
if (Input.GetKey(KeyCode.W) || Input.GetKey(KeyCode.S))
|
||||
{
|
||||
health = health + 5;
|
||||
}
|
||||
if (health >= maxHealth + equipment["HP"])
|
||||
{
|
||||
health = maxHealth + +equipment["HP"];
|
||||
}
|
||||
}
|
||||
|
||||
public void move(Vector3 input)
|
||||
{
|
||||
GameObject camera = GameObject.Find("Main Camera");
|
||||
|
||||
if (input.y != 0)
|
||||
{
|
||||
if (jumpTimer != null)
|
||||
{
|
||||
if (jumpTimer.AddSeconds(1).CompareTo(DateTime.Now) <= 0)
|
||||
{
|
||||
jumpTimer = DateTime.Now;
|
||||
gameObject.GetComponent<Rigidbody>().velocity = new Vector3(0, 5, 0);
|
||||
audioHandler.playJump();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
jumpTimer = DateTime.Now;
|
||||
gameObject.GetComponent<Rigidbody>().velocity = new Vector3(0, 5, 0);
|
||||
audioHandler.playJump();
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 movement = new Vector3(input.x, 0, input.z);
|
||||
movement = camera.transform.TransformDirection(movement);
|
||||
movement.y = 0;
|
||||
gameObject.transform.Translate(movement * speed * Time.deltaTime);
|
||||
|
||||
if (input.z != 0)
|
||||
{
|
||||
if (camera.transform.localPosition.y >= 0.5)
|
||||
{
|
||||
bobbingDirection = -1;
|
||||
}
|
||||
else if (camera.transform.localPosition.y <= 0.3)
|
||||
{
|
||||
bobbingDirection = 1;
|
||||
}
|
||||
|
||||
camera.transform.Translate(new Vector3(0, bobbingDirection, 0) * Time.deltaTime / 2);
|
||||
}
|
||||
GameObject.Find("QuestLog").GetComponent<QuestLog>().updateQuests("explore", gameObject, 1);
|
||||
}
|
||||
|
||||
public void getRotation()
|
||||
{
|
||||
GameObject needle = GameObject.Find("imgNeedle");
|
||||
float rotation = GameObject.Find("Main Camera").transform.rotation.eulerAngles.y;
|
||||
if (rotation < 0)
|
||||
{
|
||||
rotation += 360;
|
||||
}
|
||||
if (rotation >= 360)
|
||||
{
|
||||
rotation -= 360;
|
||||
}
|
||||
needle.transform.eulerAngles = new Vector3(0, 0, rotation);
|
||||
}
|
||||
|
||||
public int[] getStats()
|
||||
{
|
||||
int luck = 0;
|
||||
if (equipment != null && equipment.ContainsKey("LCK"))
|
||||
{
|
||||
luck = this.luck + equipment["LCK"];
|
||||
}
|
||||
else
|
||||
{
|
||||
luck = this.luck;
|
||||
}
|
||||
int[] result = { health, maxHealth, secondary, maxSecondary, strength, dexterity, intelligence, level, experience, maxExperience, points, luck };
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setStats(int[] stats)
|
||||
{
|
||||
maxHealth = stats[0];
|
||||
health = maxHealth;
|
||||
maxSecondary = stats[1];
|
||||
secondary = maxSecondary;
|
||||
strength = stats[2];
|
||||
dexterity = stats[3];
|
||||
intelligence = stats[4];
|
||||
}
|
||||
|
||||
public void displayAction(int index, GameObject image, GameObject desc)
|
||||
{
|
||||
skills[index].display(image, desc, secondary);
|
||||
}
|
||||
|
||||
public int calculateDamage()
|
||||
{
|
||||
int result;
|
||||
int bonus = 0;
|
||||
if (isCrit())
|
||||
{
|
||||
bonus = (strength + equipment["STR"]) * 2;
|
||||
}
|
||||
result = strength + bonus + 5 + equipment["STR"];
|
||||
switch (difficulty)
|
||||
{
|
||||
case 0:
|
||||
result = result * 2;
|
||||
break;
|
||||
case 1:
|
||||
//Default difficulty
|
||||
break;
|
||||
case 2:
|
||||
result = result / 2;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public int castSkill(int index)
|
||||
{
|
||||
int damage = 0;
|
||||
if (skills[index].canPlayerCast(secondary))
|
||||
{
|
||||
if (index == 1)
|
||||
{
|
||||
isDodging = true;
|
||||
}
|
||||
secondary = secondary - skills[index].getSecondaryConsumption();
|
||||
if (role.classname == "Wizard")
|
||||
{
|
||||
damage = skills[index].calculateDamage(intelligence + equipment["INT"], isCrit());
|
||||
}
|
||||
else
|
||||
{
|
||||
damage = skills[index].calculateDamage(strength + equipment["STR"], isCrit());
|
||||
}
|
||||
|
||||
switch (difficulty)
|
||||
{
|
||||
case 0:
|
||||
damage = damage * 2;
|
||||
break;
|
||||
case 1:
|
||||
//Default difficulty
|
||||
break;
|
||||
case 2:
|
||||
damage = damage / 2;
|
||||
break;
|
||||
}
|
||||
skills[index].playSound(audioHandler);
|
||||
}
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void reduceCooldown(int index)
|
||||
{
|
||||
for (int i = 0; i < skills.Length; i++)
|
||||
{
|
||||
if (i != index)
|
||||
{
|
||||
skills[i].reduceCooldown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool isCrit()
|
||||
{
|
||||
return rand.Next(1, 101) <= dexterity + equipment["DEX"];
|
||||
}
|
||||
|
||||
public int getKillCount()
|
||||
{
|
||||
return killcount;
|
||||
}
|
||||
|
||||
public bool takeDamage(int amount)
|
||||
{
|
||||
if (amount > 0)
|
||||
{
|
||||
if (!EasterEggHandler.isGodMode(this))
|
||||
{
|
||||
if (isDodging)
|
||||
{
|
||||
isDodging = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (rand.Next(1, 101) > dexterity + equipment["DEX"] + ((intelligence + equipment["INT"]) / 2))
|
||||
{
|
||||
health = health - amount;
|
||||
audioHandler.playDamage();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return health <= 0;
|
||||
}
|
||||
|
||||
public void enemyKilled()
|
||||
{
|
||||
uihandler.showMessage("SUCCESS;" + TextHandler.getText("enemyKilled"));
|
||||
killcount++;
|
||||
SteamWorksHandler.getSlimeAchievement(killcount);
|
||||
gameFinished();
|
||||
}
|
||||
|
||||
public void gameFinished()
|
||||
{
|
||||
if (worldGenerator.gameWon())
|
||||
{
|
||||
finishedGame = true;
|
||||
uihandler.showMessage("SUCCESS;" + TextHandler.getText("gameWon"));
|
||||
switch (difficulty)
|
||||
{
|
||||
case 0:
|
||||
SteamWorksHandler.getStandardAchievement("EasyAchievement");
|
||||
break;
|
||||
case 1:
|
||||
SteamWorksHandler.getStandardAchievement("NormalAchievement");
|
||||
break;
|
||||
case 2:
|
||||
SteamWorksHandler.getStandardAchievement("HardAchievement");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void gainExperience(int amount)
|
||||
{
|
||||
experience = experience + amount;
|
||||
if (experience >= maxExperience)
|
||||
{
|
||||
experience = experience - maxExperience;
|
||||
maxExperience = maxExperience * 2;
|
||||
level++;
|
||||
uihandler.showMessage("SUCCESS;" + TextHandler.getText("levelUp"));
|
||||
points = points + 3;
|
||||
audioHandler.playLevelUp();
|
||||
luck = luck + 2;
|
||||
}
|
||||
}
|
||||
|
||||
public void updateName(Text nameUI)
|
||||
{
|
||||
nameUI.text = playername + " (" + TextHandler.getText(race.racename) + "/" + TextHandler.getText(role.classname) + ", Lvl. " + level + ")";
|
||||
}
|
||||
|
||||
public void updateNameHUD(Text nameUI)
|
||||
{
|
||||
nameUI.text = playername + "\n\r" + TextHandler.getText(race.racename) + "/" + TextHandler.getText(role.classname) + "\r\n Lvl. " + level;
|
||||
}
|
||||
|
||||
public void upgradeStrength()
|
||||
{
|
||||
if (points > 0)
|
||||
{
|
||||
strength++;
|
||||
points--;
|
||||
}
|
||||
else
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void upgradeDexterity()
|
||||
{
|
||||
if (points > 0)
|
||||
{
|
||||
dexterity++;
|
||||
points--;
|
||||
}
|
||||
else
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void upgradeIntelligence()
|
||||
{
|
||||
if (points > 0)
|
||||
{
|
||||
intelligence++;
|
||||
points--;
|
||||
}
|
||||
else
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void upgradeHealth()
|
||||
{
|
||||
if (points > 0)
|
||||
{
|
||||
maxHealth = maxHealth + 5;
|
||||
health = maxHealth + equipment["HP"];
|
||||
points--;
|
||||
}
|
||||
else
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void upgradeSecondary()
|
||||
{
|
||||
if (points > 0)
|
||||
{
|
||||
maxSecondary = maxSecondary + 5;
|
||||
secondary = maxSecondary + equipment["MP"];
|
||||
points--;
|
||||
}
|
||||
else
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void displaySkills(GameObject pnlSkills)
|
||||
{
|
||||
for (int i = 1; i <= 3; i++)
|
||||
{
|
||||
GameObject skill = pnlSkills.transform.Find("skill" + i).gameObject;
|
||||
skills[i - 1].displaySkill(skill.transform.Find("imgAction").gameObject, skill.transform.Find("descAction").gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public string getPlayerName()
|
||||
{
|
||||
return playername;
|
||||
}
|
||||
|
||||
public int getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
|
||||
public BasicRace getRace()
|
||||
{
|
||||
return race;
|
||||
}
|
||||
|
||||
public BasicClass getClass()
|
||||
{
|
||||
return role;
|
||||
}
|
||||
|
||||
public string saveGame()
|
||||
{
|
||||
string result = "";
|
||||
result = result + FileHandler.generateJSON("playername", "\"" + playername + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("maxHealth", maxHealth) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("maxSecondary", maxSecondary) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("secondary", secondary) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("health", health) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("strength", strength) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("dexterity", dexterity) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("intelligence", intelligence) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("level", level) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("experience", experience) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("maxExperience", maxExperience) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("race", "\"" + race.racename + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("role", "\"" + role.classname + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("points", points) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("healthRegen", healthRegen) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("secondaryRegen", secondaryRegen) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("isDodging", "\"" + isDodging + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("killcount", killcount) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("luck", luck) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("difficulty", difficulty);
|
||||
return result;
|
||||
}
|
||||
|
||||
public void loadPlayer(JToken json)
|
||||
{
|
||||
playername = json["playername"].ToString();
|
||||
maxHealth = (int)json["maxHealth"];
|
||||
maxSecondary = (int)json["maxSecondary"];
|
||||
secondary = (int)json["secondary"];
|
||||
health = (int)json["health"];
|
||||
strength = (int)json["strength"];
|
||||
dexterity = (int)json["dexterity"];
|
||||
intelligence = (int)json["intelligence"];
|
||||
level = (int)json["level"];
|
||||
experience = (int)json["experience"];
|
||||
maxExperience = (int)json["maxExperience"];
|
||||
loadRole(json["role"].ToString());
|
||||
loadRace(json["race"].ToString());
|
||||
points = (int)json["points"];
|
||||
luck = (int)json["luck"];
|
||||
healthRegen = (int)json["healthRegen"];
|
||||
secondaryRegen = (int)json["secondaryRegen"];
|
||||
isDodging = bool.Parse(json["isDodging"].ToString());
|
||||
killcount = (int)json["killcount"];
|
||||
difficulty = (int)json["difficulty"];
|
||||
generateSkills();
|
||||
}
|
||||
|
||||
private void loadRole(string name)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "Warrior":
|
||||
role = new WarriorClass();
|
||||
break;
|
||||
case "Mage":
|
||||
role = new MageClass();
|
||||
break;
|
||||
case "Thief":
|
||||
role = new ThiefClass();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void loadRace(string name)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "Human":
|
||||
race = new HumanRace();
|
||||
break;
|
||||
case "Dwarf":
|
||||
race = new DwarvenRace();
|
||||
break;
|
||||
case "Elf":
|
||||
race = new ElvenRace();
|
||||
break;
|
||||
case "Giant":
|
||||
race = new GiantRace();
|
||||
break;
|
||||
case "Goblin":
|
||||
race = new GoblinRace();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public int getLuck()
|
||||
{
|
||||
return luck;
|
||||
}
|
||||
|
||||
void OnTriggerEnter(Collider col)
|
||||
{
|
||||
if (col.gameObject.name.Contains("_"))
|
||||
{
|
||||
worldGenerator.changeCurrentTile(col.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerStay(Collider col)
|
||||
{
|
||||
if (col.gameObject.name.Contains("border"))
|
||||
{
|
||||
Vector3 newTile = new Vector3();
|
||||
if (col.gameObject.name.ToLower() == "bordernorth")
|
||||
{
|
||||
newTile = newTile + new Vector3(0, 0, 1);
|
||||
}
|
||||
if (col.gameObject.name.ToLower() == "bordersouth")
|
||||
{
|
||||
newTile = newTile + new Vector3(0, 0, -1);
|
||||
}
|
||||
if (col.gameObject.name.ToLower() == "bordereast")
|
||||
{
|
||||
newTile = newTile + new Vector3(1, 0, 0);
|
||||
}
|
||||
if (col.gameObject.name.ToLower() == "borderwest")
|
||||
{
|
||||
newTile = newTile + new Vector3(-1, 0, 0);
|
||||
}
|
||||
worldGenerator.createTile(newTile);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,8 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 708b71484eb134b679733d6faf5be21d
|
||||
NativeFormatImporter:
|
||||
guid: f3d401c0fa6bedaed8fd60cec0ed3af7
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 15600000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -3,7 +3,7 @@ using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
namespace Assets.Scripts
|
||||
namespace Assets.Scripts.Player
|
||||
{
|
||||
public class PlayerCamera : MonoBehaviour
|
||||
{
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0dafbb406c854e141ba4c7f354514063
|
||||
guid: ccf47fd0e7044a6f08a0f3353ee62cf5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
376
Assets/Scripts/Player/PlayerGameObject.cs
Normal file
376
Assets/Scripts/Player/PlayerGameObject.cs
Normal file
@ -0,0 +1,376 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Assets.Scripts.Classes;
|
||||
using Assets.Scripts.Races;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Assets.Scripts.Player
|
||||
{
|
||||
public class PlayerGameObject : MonoBehaviour
|
||||
{
|
||||
UIHandler uihandler;
|
||||
AudioHandler audioHandler;
|
||||
WorldGenerator worldGenerator;
|
||||
Inventory inventory;
|
||||
int difficulty = 0;
|
||||
bool finishedGame = false;
|
||||
PlayerObject player;
|
||||
public float speed = 5f;
|
||||
DateTime jumpTimer;
|
||||
DateTime now;
|
||||
int bobbingDirection = -1;
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
SceneHandler.switchGameToMenu();
|
||||
#endif
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
uihandler = GameObject.Find("UIHandler").GetComponent<UIHandler>();
|
||||
audioHandler = GameObject.Find("AudioHandler").GetComponent<AudioHandler>();
|
||||
|
||||
if (GameObject.Find("Inventory") != null)
|
||||
{
|
||||
inventory = GameObject.Find("Inventory").GetComponent<Inventory>();
|
||||
}
|
||||
if (GameObject.Find("WorldGenerator") != null)
|
||||
{
|
||||
worldGenerator = GameObject.Find("WorldGenerator").GetComponent<WorldGenerator>();
|
||||
}
|
||||
generatePlayer();
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
if (player.getStat("Killcount").getAmount() != -1)
|
||||
{
|
||||
getRotation();
|
||||
regeneratePlayer();
|
||||
uihandler.adjustInformation(this);
|
||||
if (!finishedGame)
|
||||
{
|
||||
gameFinished();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void regeneratePlayer()
|
||||
{
|
||||
if (uihandler.state != UIState.FIGHT)
|
||||
{
|
||||
if (now == null)
|
||||
{
|
||||
now = DateTime.Now;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (now.AddSeconds(10).CompareTo(DateTime.Now) <= 0)
|
||||
{
|
||||
now = DateTime.Now;
|
||||
player.regainSecondary(inventory.getEquipmentBonus()["MPR"],inventory.getEquipmentBonus()["MP"]);
|
||||
player.healPlayer(inventory.getEquipmentBonus()["HPR"],inventory.getEquipmentBonus()["HP"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
now = DateTime.Now;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void generatePlayer()
|
||||
{
|
||||
BasicRace race = new BasicRace();
|
||||
BasicClass role = new BasicClass();
|
||||
switch (PlayerPrefs.GetInt("class"))
|
||||
{
|
||||
case 0:
|
||||
role = new WarriorClass();
|
||||
break;
|
||||
case 1:
|
||||
role = new MageClass();
|
||||
break;
|
||||
case 2:
|
||||
role = new ThiefClass();
|
||||
break;
|
||||
}
|
||||
switch (PlayerPrefs.GetInt("race"))
|
||||
{
|
||||
case 0:
|
||||
race = new HumanRace();
|
||||
break;
|
||||
case 1:
|
||||
race = new ElvenRace();
|
||||
break;
|
||||
case 2:
|
||||
race = new DwarvenRace();
|
||||
break;
|
||||
case 3:
|
||||
race = new GoblinRace();
|
||||
break;
|
||||
case 4:
|
||||
race = new GiantRace();
|
||||
break;
|
||||
}
|
||||
string playername = PlayerPrefs.GetString("playername");
|
||||
difficulty = PlayerPrefs.GetInt("difficulty");
|
||||
player = new PlayerObject(playername, race, role, difficulty);
|
||||
}
|
||||
|
||||
public void generatePlayer(BasicRace playerRace, BasicClass playerClass, string name, int difficulty){
|
||||
player = new PlayerObject(name, playerRace, playerClass, difficulty);
|
||||
}
|
||||
|
||||
public void move(Vector3 input)
|
||||
{
|
||||
GameObject camera = GameObject.Find("Main Camera");
|
||||
|
||||
if (input.y != 0)
|
||||
{
|
||||
if (jumpTimer != null)
|
||||
{
|
||||
if (jumpTimer.AddSeconds(1).CompareTo(DateTime.Now) <= 0)
|
||||
{
|
||||
jumpTimer = DateTime.Now;
|
||||
gameObject.GetComponent<Rigidbody>().velocity = new Vector3(0, 5, 0);
|
||||
audioHandler.playJump();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
jumpTimer = DateTime.Now;
|
||||
gameObject.GetComponent<Rigidbody>().velocity = new Vector3(0, 5, 0);
|
||||
audioHandler.playJump();
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 movement = new Vector3(input.x, 0, input.z);
|
||||
movement = camera.transform.TransformDirection(movement);
|
||||
movement.y = 0;
|
||||
gameObject.transform.Translate(movement * speed * Time.deltaTime);
|
||||
|
||||
if (input.z != 0)
|
||||
{
|
||||
if (camera.transform.localPosition.y >= 0.5)
|
||||
{
|
||||
bobbingDirection = -1;
|
||||
}
|
||||
else if (camera.transform.localPosition.y <= 0.3)
|
||||
{
|
||||
bobbingDirection = 1;
|
||||
}
|
||||
|
||||
camera.transform.Translate(new Vector3(0, bobbingDirection, 0) * Time.deltaTime / 2);
|
||||
}
|
||||
GameObject.Find("QuestLog").GetComponent<QuestLog>().updateQuests("explore", gameObject, 1);
|
||||
}
|
||||
|
||||
public void getRotation()
|
||||
{
|
||||
GameObject needle = GameObject.Find("imgNeedle");
|
||||
float rotation = GameObject.Find("Main Camera").transform.rotation.eulerAngles.y;
|
||||
if (rotation < 0)
|
||||
{
|
||||
rotation += 360;
|
||||
}
|
||||
if (rotation >= 360)
|
||||
{
|
||||
rotation -= 360;
|
||||
}
|
||||
needle.transform.eulerAngles = new Vector3(0, 0, rotation);
|
||||
}
|
||||
|
||||
public void gameFinished()
|
||||
{
|
||||
if (worldGenerator.gameWon())
|
||||
{
|
||||
finishedGame = true;
|
||||
uihandler.showMessage("SUCCESS;" + TextHandler.getText("gameWon"));
|
||||
switch (difficulty)
|
||||
{
|
||||
case 0:
|
||||
SteamWorksHandler.getStandardAchievement("EasyAchievement");
|
||||
break;
|
||||
case 1:
|
||||
SteamWorksHandler.getStandardAchievement("NormalAchievement");
|
||||
break;
|
||||
case 2:
|
||||
SteamWorksHandler.getStandardAchievement("HardAchievement");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
void OnTriggerEnter(Collider col)
|
||||
{
|
||||
if (col.gameObject.name.Contains("_"))
|
||||
{
|
||||
worldGenerator.changeCurrentTile(col.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
void OnTriggerStay(Collider col)
|
||||
{
|
||||
if (col.gameObject.name.Contains("border"))
|
||||
{
|
||||
Vector3 newTile = new Vector3();
|
||||
if (col.gameObject.name.ToLower() == "bordernorth")
|
||||
{
|
||||
newTile = newTile + new Vector3(0, 0, 1);
|
||||
}
|
||||
if (col.gameObject.name.ToLower() == "bordersouth")
|
||||
{
|
||||
newTile = newTile + new Vector3(0, 0, -1);
|
||||
}
|
||||
if (col.gameObject.name.ToLower() == "bordereast")
|
||||
{
|
||||
newTile = newTile + new Vector3(1, 0, 0);
|
||||
}
|
||||
if (col.gameObject.name.ToLower() == "borderwest")
|
||||
{
|
||||
newTile = newTile + new Vector3(-1, 0, 0);
|
||||
}
|
||||
worldGenerator.createTile(newTile);
|
||||
}
|
||||
}
|
||||
|
||||
public void displayAction(int index, GameObject image, GameObject desc)
|
||||
{
|
||||
player.getSkill(index).display(image, desc, player.getStat("Secondary").getAmount());
|
||||
}
|
||||
|
||||
public void enemyKilled()
|
||||
{
|
||||
uihandler.showMessage("SUCCESS;" + TextHandler.getText("enemyKilled"));
|
||||
player.getStat("Killcount").changeAmount(1);
|
||||
SteamWorksHandler.getSlimeAchievement(player.getStat("Killcount").getAmount());
|
||||
gameFinished();
|
||||
}
|
||||
|
||||
public void gainExperience(int amount)
|
||||
{
|
||||
if (player.gainExperience(amount))
|
||||
{
|
||||
uihandler.showMessage("SUCCESS;" + TextHandler.getText("levelUp"));
|
||||
audioHandler.playLevelUp();
|
||||
}
|
||||
}
|
||||
|
||||
public void updateName(Text nameUI)
|
||||
{
|
||||
nameUI.text = player.getPlayerName() + " (" + TextHandler.getText(player.getRace().racename) + "/" + TextHandler.getText(player.getClass().classname) + ", Lvl. " + player.getStat("Level").getAmount() + ")";
|
||||
}
|
||||
|
||||
public void updateNameHUD(Text nameUI)
|
||||
{
|
||||
nameUI.text = player.getPlayerName() + "\n\r" + TextHandler.getText(player.getRace().racename) + "/" + TextHandler.getText(player.getClass().classname) + "\r\n Lvl. " + player.getStat("Level").getAmount();
|
||||
}
|
||||
|
||||
public void upgradeStrength()
|
||||
{
|
||||
if (!player.upgradeStat("Strength", 1))
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void upgradeDexterity()
|
||||
{
|
||||
if (!player.upgradeStat("Dexterity", 1))
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void upgradeIntelligence()
|
||||
{
|
||||
if (!player.upgradeStat("Intelligence", 1))
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void upgradeHealth()
|
||||
{
|
||||
if (!player.upgradeStat("MaxHealth", 5))
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void upgradeSecondary()
|
||||
{
|
||||
if (!player.upgradeStat("MaxSecondary", 5))
|
||||
{
|
||||
uihandler.showMessage("ERROR;" + TextHandler.getText("noPoints"));
|
||||
}
|
||||
}
|
||||
|
||||
public void displaySkills(GameObject pnlSkills)
|
||||
{
|
||||
for (int i = 1; i <= 3; i++)
|
||||
{
|
||||
GameObject skill = pnlSkills.transform.Find("skill" + i).gameObject;
|
||||
player.getSkill(i - 1).displaySkill(skill.transform.Find("imgAction").gameObject, skill.transform.Find("descAction").gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
public PlayerStat getPlayerStat(string identifier){
|
||||
return player.getStat(identifier);
|
||||
}
|
||||
|
||||
public void loadPlayer(JToken json){
|
||||
player = new PlayerObject();
|
||||
player.loadPlayer(json);
|
||||
}
|
||||
|
||||
public PlayerObject getPlayer(){
|
||||
return player;
|
||||
}
|
||||
|
||||
public string saveGame(){
|
||||
return player.saveGame();
|
||||
}
|
||||
|
||||
public BasicClass getClass(){
|
||||
return player.getClass();
|
||||
}
|
||||
|
||||
public BasicRace getRace(){
|
||||
return player.getRace();
|
||||
}
|
||||
|
||||
public int calculateDamage(){
|
||||
return player.calculateDamage(inventory.getEquipmentBonus()["STR"], inventory.getEquipmentBonus()["DEX"]);
|
||||
}
|
||||
|
||||
public bool takeDamage(int amount){
|
||||
if(player != null){
|
||||
return player.takeDamage(amount,inventory.getEquipmentBonus()["DEX"], inventory.getEquipmentBonus()["INT"]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public int castSkill(int skillnumber){
|
||||
return player.castSkill(skillnumber,inventory.getEquipmentBonus()["INT"], inventory.getEquipmentBonus()["STR"], inventory.getEquipmentBonus()["DEX"]);
|
||||
}
|
||||
|
||||
public void reduceCooldown(int skillnumber){
|
||||
player.reduceCooldown(skillnumber);
|
||||
}
|
||||
|
||||
public void regainSecondary(){
|
||||
player.regainSecondary(inventory.getEquipmentBonus()["MPR"], inventory.getEquipmentBonus()["MP"]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6eac15f641a82224c87a6ada5746d64b
|
||||
guid: ac07c553f4e010e8299fb870481dcc49
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
381
Assets/Scripts/Player/PlayerObject.cs
Normal file
381
Assets/Scripts/Player/PlayerObject.cs
Normal file
@ -0,0 +1,381 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Assets.Scripts.Classes;
|
||||
using Assets.Scripts.Races;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace Assets.Scripts.Player
|
||||
{
|
||||
public class PlayerObject
|
||||
{
|
||||
Random rand = new Random();
|
||||
Dictionary<string, PlayerStat> stats;
|
||||
string playername;
|
||||
BasicRace race;
|
||||
BasicClass role;
|
||||
BasicSkill[] skills = new BasicSkill[3];
|
||||
bool isDodging = false;
|
||||
int difficulty;
|
||||
|
||||
public PlayerObject(string playername, BasicRace race, BasicClass role, int difficulty)
|
||||
{
|
||||
this.playername = playername;
|
||||
this.race = race;
|
||||
this.role = role;
|
||||
this.difficulty = difficulty;
|
||||
generateStats(false);
|
||||
generateSkills();
|
||||
EasterEggHandler.applyEasterEgg(this);
|
||||
}
|
||||
|
||||
public PlayerObject()
|
||||
{
|
||||
generateStats(true);
|
||||
}
|
||||
|
||||
private void generateStats(bool isLoad)
|
||||
{
|
||||
stats = new Dictionary<string, PlayerStat>();
|
||||
stats.Add("Health", new PlayerStat("Health", 100, "The current health of the player"));
|
||||
stats.Add("MaxHealth", new PlayerStat("MaxHealth", 100, "The current max health of the player"));
|
||||
stats.Add("Secondary", new PlayerStat("Secondary", 20, "The current secondary of the player"));
|
||||
stats.Add("MaxSecondary", new PlayerStat("MaxSecondary", 20, "The current max secondary of the player"));
|
||||
stats.Add("Strength", new PlayerStat("Strength", 5, "The current strength of the player"));
|
||||
stats.Add("Dexterity", new PlayerStat("Dexterity", 5, "The current dexterity of the player"));
|
||||
stats.Add("Intelligence", new PlayerStat("Intelligence", 5, "The current intelligence of the player"));
|
||||
stats.Add("Experience", new PlayerStat("Experience", 0, "The current experience of the player"));
|
||||
stats.Add("MaxExperience", new PlayerStat("MaxExperience", 10, "The current max experience of the player"));
|
||||
stats.Add("HealthRegen", new PlayerStat("HealthRegen", 30 / (difficulty + 1), "The current health regen of the player"));
|
||||
stats.Add("SecondaryRegen", new PlayerStat("SecondaryRegen", 5, "The current secondary regen of the player"));
|
||||
stats.Add("Level", new PlayerStat("Level", 0, "The current level of the player"));
|
||||
stats.Add("Luck", new PlayerStat("Luck", 20 - (difficulty * 5), "The current luck of the player"));
|
||||
stats.Add("Killcount", new PlayerStat("Killcount", -1, "The current killcount of the player"));
|
||||
stats.Add("Points", new PlayerStat("Points", 0, "The current skillpoints of the player"));
|
||||
|
||||
if (!isLoad)
|
||||
{
|
||||
race.applyBonus(this);
|
||||
role.applyBonus(this);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void generateSkills()
|
||||
{
|
||||
switch (role.classname)
|
||||
{
|
||||
case "Warrior":
|
||||
skills[0] = new BasicSkill(20, 10, 2, "Slash", "Skills/Warrior/Slash", null);
|
||||
skills[0].setDescription(TextHandler.getText("slashDesc"));
|
||||
skills[1] = new BasicSkill(0, 5, 1, "Block", "Skills/Warrior/Block", null);
|
||||
skills[1].setDescription(TextHandler.getText("blockDesc"));
|
||||
skills[2] = new BasicSkill(35, 30, 4, "Execution", "Skills/Warrior/Execution", null);
|
||||
skills[2].setDescription(TextHandler.getText("executionDesc"));
|
||||
break;
|
||||
case "Thief":
|
||||
skills[0] = new BasicSkill(20, 10, 2, "Stab", "Skills/Thief/Stab", null);
|
||||
skills[0].setDescription(TextHandler.getText("stabDesc"));
|
||||
skills[1] = new BasicSkill(0, 5, 1, "SmokeScreen", "Skills/Thief/SmokeScreen", null);
|
||||
skills[1].setDescription(TextHandler.getText("smokeScreenDesc"));
|
||||
skills[2] = new BasicSkill(35, 30, 4, "Heartstop", "Skills/Thief/Heartstop", null);
|
||||
skills[2].setDescription(TextHandler.getText("heartStopDesc"));
|
||||
break;
|
||||
case "Mage":
|
||||
skills[0] = new BasicSkill(20, 10, 2, "Icicle", "Skills/Mage/Icicle", null);
|
||||
skills[0].setDescription(TextHandler.getText("icicleDesc"));
|
||||
skills[1] = new BasicSkill(0, 5, 1, "Teleport", "Skills/Mage/Teleport", null);
|
||||
skills[1].setDescription(TextHandler.getText("teleportDesc"));
|
||||
skills[2] = new BasicSkill(35, 30, 4, "Fireball", "Skills/Mage/Fireball", null);
|
||||
skills[2].setDescription(TextHandler.getText("fireballDesc"));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void loadPlayer(JToken json)
|
||||
{
|
||||
playername = json["playername"].ToString();
|
||||
|
||||
stats["MaxHealth"].setAmount((int)json["maxHealth"]);
|
||||
stats["MaxSecondary"].setAmount((int)json["maxSecondary"]);
|
||||
stats["Secondary"].setAmount((int)json["secondary"]);
|
||||
stats["Health"].setAmount((int)json["health"]);
|
||||
stats["Strength"].setAmount((int)json["strength"]);
|
||||
stats["Dexterity"].setAmount((int)json["dexterity"]);
|
||||
stats["Intelligence"].setAmount((int)json["intelligence"]);
|
||||
stats["Level"].setAmount((int)json["level"]);
|
||||
stats["Experience"].setAmount((int)json["experience"]);
|
||||
stats["MaxExperience"].setAmount((int)json["maxExperience"]);
|
||||
stats["Points"].setAmount((int)json["points"]);
|
||||
stats["Luck"].setAmount((int)json["luck"]);
|
||||
stats["HealthRegen"].setAmount((int)json["healthRegen"]);
|
||||
stats["SecondaryRegen"].setAmount((int)json["secondaryRegen"]);
|
||||
stats["Killcount"].setAmount((int)json["killcount"]);
|
||||
|
||||
loadRole(json["role"].ToString());
|
||||
loadRace(json["race"].ToString());
|
||||
isDodging = bool.Parse(json["isDodging"].ToString());
|
||||
difficulty = (int)json["difficulty"];
|
||||
generateSkills();
|
||||
}
|
||||
|
||||
private void loadRole(string name)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "Warrior":
|
||||
role = new WarriorClass();
|
||||
break;
|
||||
case "Mage":
|
||||
role = new MageClass();
|
||||
break;
|
||||
case "Thief":
|
||||
role = new ThiefClass();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void loadRace(string name)
|
||||
{
|
||||
switch (name)
|
||||
{
|
||||
case "Human":
|
||||
race = new HumanRace();
|
||||
break;
|
||||
case "Dwarf":
|
||||
race = new DwarvenRace();
|
||||
break;
|
||||
case "Elf":
|
||||
race = new ElvenRace();
|
||||
break;
|
||||
case "Giant":
|
||||
race = new GiantRace();
|
||||
break;
|
||||
case "Goblin":
|
||||
race = new GoblinRace();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void changeStats(int strength, int health, int dexterity, int intelligence, int secondary)
|
||||
{
|
||||
stats["MaxHealth"].changeAmount(health);
|
||||
stats["Health"].changeAmount(stats["MaxHealth"].getAmount());
|
||||
stats["MaxSecondary"].changeAmount(secondary);
|
||||
stats["Secondary"].changeAmount(stats["MaxSecondary"].getAmount());
|
||||
stats["Strength"].changeAmount(strength);
|
||||
stats["Dexterity"].changeAmount(dexterity);
|
||||
stats["Intelligence"].changeAmount(intelligence);
|
||||
}
|
||||
|
||||
public void regainSecondary(int equipRegen, int equipStat)
|
||||
{
|
||||
stats["Secondary"].changeAmount(stats["SecondaryRegen"].getAmount() + equipRegen);
|
||||
if (stats["Secondary"].getAmount() >= stats["MaxSecondary"].getAmount() + equipStat)
|
||||
{
|
||||
stats["Secondary"].setAmount(stats["MaxSecondary"].getAmount() + equipStat);
|
||||
}
|
||||
}
|
||||
|
||||
public void healPlayer(int equipRegen, int equipStat)
|
||||
{
|
||||
stats["Health"].changeAmount(stats["HealthRegen"].getAmount() + equipRegen);
|
||||
if (stats["Health"].getAmount() >= stats["MaxHealth"].getAmount() + equipStat)
|
||||
{
|
||||
stats["Health"].setAmount(stats["MaxHealth"].getAmount() + equipStat);
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<string, PlayerStat> getStats()
|
||||
{
|
||||
return stats;
|
||||
}
|
||||
|
||||
public void setStats(Dictionary<string, PlayerStat> stats)
|
||||
{
|
||||
this.stats = stats;
|
||||
}
|
||||
|
||||
public PlayerStat getStat(string identifier)
|
||||
{
|
||||
return stats[identifier];
|
||||
}
|
||||
|
||||
public BasicSkill getSkill(int index)
|
||||
{
|
||||
return skills[index];
|
||||
}
|
||||
|
||||
public int calculateDamage(int equipStatStr, int equipStatDex)
|
||||
{
|
||||
int result;
|
||||
int bonus = 0;
|
||||
if (isCrit(equipStatDex))
|
||||
{
|
||||
bonus = (stats["Strength"].getAmount() + equipStatStr) * 2;
|
||||
}
|
||||
result = stats["Strength"].getAmount() + bonus + 5 + equipStatStr;
|
||||
switch (difficulty)
|
||||
{
|
||||
case 0:
|
||||
result = result * 2;
|
||||
break;
|
||||
case 1:
|
||||
//Default difficulty
|
||||
break;
|
||||
case 2:
|
||||
result = result / 2;
|
||||
break;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public int castSkill(int index, int equipStatInt, int equipStatStr, int equipStatDex)
|
||||
{
|
||||
int damage = 0;
|
||||
if (skills[index].canPlayerCast(stats["Secondary"].getAmount()))
|
||||
{
|
||||
if (index == 1)
|
||||
{
|
||||
isDodging = true;
|
||||
}
|
||||
stats["Secondary"].changeAmount(-skills[index].getSecondaryConsumption());
|
||||
if (role.classname == "Wizard")
|
||||
{
|
||||
damage = skills[index].calculateDamage(stats["Intelligence"].getAmount() + equipStatInt, isCrit(equipStatDex));
|
||||
}
|
||||
else
|
||||
{
|
||||
damage = skills[index].calculateDamage(stats["Strength"].getAmount() + equipStatStr, isCrit(equipStatDex));
|
||||
}
|
||||
|
||||
switch (difficulty)
|
||||
{
|
||||
case 0:
|
||||
damage = damage * 2;
|
||||
break;
|
||||
case 1:
|
||||
//Default difficulty
|
||||
break;
|
||||
case 2:
|
||||
damage = damage / 2;
|
||||
break;
|
||||
}
|
||||
//TODO: Let caller of this method handle audio if damage is higher than 0 // skills[index].playSound(audioHandler);
|
||||
}
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void reduceCooldown(int index)
|
||||
{
|
||||
for (int i = 0; i < skills.Length; i++)
|
||||
{
|
||||
if (i != index)
|
||||
{
|
||||
skills[i].reduceCooldown();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public bool isCrit(int equipStat)
|
||||
{
|
||||
return rand.Next(1, 101) <= stats["Dexterity"].getAmount() + equipStat;
|
||||
}
|
||||
|
||||
public bool takeDamage(int amount, int equipStatDex, int equipStatInt)
|
||||
{
|
||||
|
||||
if (amount <= 0 || EasterEggHandler.isGodMode(this))
|
||||
{
|
||||
return stats["Health"].getAmount() <= 0;
|
||||
}
|
||||
|
||||
if (isDodging)
|
||||
{
|
||||
isDodging = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
int dodgeChance = stats["Dexterity"].getAmount() + equipStatDex + ((stats["Intelligence"].getAmount() + equipStatInt) / 2);
|
||||
if (rand.Next(1, 101) > dodgeChance)
|
||||
{
|
||||
stats["Health"].changeAmount(-amount);
|
||||
//TODO: Let caller of this method handle audio // audioHandler.playDamage();
|
||||
}
|
||||
}
|
||||
return stats["Health"].getAmount() <= 0;
|
||||
}
|
||||
|
||||
public bool gainExperience(int amount)
|
||||
{
|
||||
bool result = false;
|
||||
stats["Experience"].changeAmount(amount);
|
||||
if (stats["Experience"].getAmount() >= stats["MaxExperience"].getAmount())
|
||||
{
|
||||
stats["Experience"].changeAmount(-stats["MaxExperience"].getAmount());
|
||||
stats["MaxExperience"].changeAmount(stats["MaxExperience"].getAmount());
|
||||
stats["Level"].changeAmount(1);
|
||||
stats["Points"].changeAmount(3);
|
||||
stats["Luck"].changeAmount(2);
|
||||
result = true;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public bool upgradeStat(string identifier, int amount)
|
||||
{
|
||||
bool result = false;
|
||||
if (stats["Points"].getAmount() > 0)
|
||||
{
|
||||
result = true;
|
||||
stats[identifier].changeAmount(amount);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
public string getPlayerName()
|
||||
{
|
||||
return playername;
|
||||
}
|
||||
|
||||
public int getDifficulty()
|
||||
{
|
||||
return difficulty;
|
||||
}
|
||||
|
||||
public BasicRace getRace()
|
||||
{
|
||||
return race;
|
||||
}
|
||||
|
||||
public BasicClass getClass()
|
||||
{
|
||||
return role;
|
||||
}
|
||||
|
||||
public string saveGame()
|
||||
{
|
||||
string result = "";
|
||||
result = result + FileHandler.generateJSON("playername", "\"" + playername + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("maxHealth", stats["MaxHealth"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("maxSecondary", stats["MaxSecondary"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("secondary", stats["Secondary"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("health", stats["Health"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("strength", stats["Strength"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("dexterity", stats["Dexterity"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("intelligence", stats["Intelligence"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("level", stats["Level"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("experience", stats["Experience"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("maxExperience", stats["MaxExperience"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("race", "\"" + race.racename + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("role", "\"" + role.classname + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("points", stats["Points"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("healthRegen", stats["HealthRegen"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("secondaryRegen", stats["SecondaryRegen"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("isDodging", "\"" + isDodging + "\"") + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("killcount", stats["Killcount"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("luck", stats["Luck"].getAmount()) + ",\r\n";
|
||||
result = result + FileHandler.generateJSON("difficulty", difficulty);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Player/PlayerObject.cs.meta
Normal file
11
Assets/Scripts/Player/PlayerObject.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8f3ccf8e929cf8c32b9a9479e8870bbd
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
48
Assets/Scripts/Player/PlayerStat.cs
Normal file
48
Assets/Scripts/Player/PlayerStat.cs
Normal file
@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using Assets.Scripts.Classes;
|
||||
using Assets.Scripts.Races;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace Assets.Scripts.Player
|
||||
{
|
||||
public class PlayerStat
|
||||
{
|
||||
string text;
|
||||
int amount;
|
||||
string tooltip;
|
||||
|
||||
public PlayerStat(string text, int amount, string tooltip){
|
||||
this.text = text;
|
||||
this.amount = amount;
|
||||
this.tooltip = tooltip;
|
||||
}
|
||||
|
||||
public string getTooltip(){
|
||||
return this.tooltip;
|
||||
}
|
||||
|
||||
public string getText(){
|
||||
return this.text;
|
||||
}
|
||||
|
||||
public int getAmount(){
|
||||
return this.amount;
|
||||
}
|
||||
|
||||
public void changeAmount(int change){
|
||||
this.amount = this.amount + change;
|
||||
}
|
||||
|
||||
public void setAmount(int amount){
|
||||
this.amount = amount;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Player/PlayerStat.cs.meta
Normal file
11
Assets/Scripts/Player/PlayerStat.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 3038d55d00ed9d790b3f50d461689251
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -1,3 +1,4 @@
|
||||
using Assets.Scripts.Player;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@ -112,7 +113,7 @@ namespace Assets.Scripts
|
||||
public void removeQuests()
|
||||
{
|
||||
Inventory inventory = GameObject.Find("Inventory").GetComponent<Inventory>();
|
||||
int luck = GameObject.Find("Player").GetComponent<Player>().getLuck();
|
||||
int luck = GameObject.Find("Player").GetComponent<PlayerGameObject>().getPlayerStat("Luck").getAmount();
|
||||
luck = luck + inventory.getEquipmentBonus()["LCK"];
|
||||
Dictionary<string, List<Quest>> toDelete = new Dictionary<string, List<Quest>>();
|
||||
foreach (string key in quests.Keys)
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
using Assets.Scripts.Player;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@ -9,7 +10,7 @@ namespace Assets.Scripts
|
||||
{
|
||||
public ExploreQuest(GameObject display) : base(display)
|
||||
{
|
||||
Vector3 playerPos = GameObject.Find("Player").GetComponent<Player>().transform.position;
|
||||
Vector3 playerPos = GameObject.Find("Player").GetComponent<PlayerGameObject>().transform.position;
|
||||
float coordX = getRandomNumber(1000) - 500;
|
||||
float coordZ = getRandomNumber(1000) - 500;
|
||||
coordinates = new Vector3(playerPos.x + coordX, 0, playerPos.z + coordZ);
|
||||
|
||||
@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Races
|
||||
{
|
||||
@ -25,7 +26,7 @@ namespace Assets.Scripts.Races
|
||||
secondaryBonus = 0;
|
||||
}
|
||||
|
||||
public void applyBonus(Player player)
|
||||
public void applyBonus(PlayerObject player)
|
||||
{
|
||||
player.changeStats(strengthBonus, healthBonus, dexterityBonus, intelligenceBonus, secondaryBonus);
|
||||
}
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Assets.Scripts.Player;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@ -21,20 +22,18 @@ namespace Assets.Scripts.Slimes
|
||||
protected Item item;
|
||||
protected int luck;
|
||||
|
||||
public BasicSlime(Player player)
|
||||
public BasicSlime(PlayerGameObject player)
|
||||
{
|
||||
//health,maxHealth,secondary,maxSecondary,strength,dexterity,intelligence,level,experience,maxExperience,points,luck
|
||||
int[] playerStats = player.getStats();
|
||||
maxHealth = playerStats[1];
|
||||
maxHealth = player.getPlayerStat("MaxHealth").getAmount();
|
||||
health = maxHealth;
|
||||
maxSecondary = playerStats[3];
|
||||
maxSecondary = player.getPlayerStat("MaxSecondary").getAmount();
|
||||
secondary = maxSecondary;
|
||||
strength = playerStats[4];
|
||||
dexterity = playerStats[5];
|
||||
intelligence = playerStats[6];
|
||||
experience = (int)(10 + playerStats[7] * 2.5f);
|
||||
level = playerStats[7];
|
||||
luck = playerStats[11];
|
||||
strength = player.getPlayerStat("Strength").getAmount();
|
||||
dexterity = player.getPlayerStat("Dexterity").getAmount();
|
||||
intelligence = player.getPlayerStat("Intelligence").getAmount();
|
||||
experience = (int)(10 + player.getPlayerStat("Experience").getAmount() * 2.5f);
|
||||
level = player.getPlayerStat("Level").getAmount();
|
||||
luck = player.getPlayerStat("Luck").getAmount();
|
||||
}
|
||||
|
||||
public BasicSlime(JToken json)
|
||||
|
||||
@ -3,12 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Slimes
|
||||
{
|
||||
class BossSlime : BasicSlime
|
||||
{
|
||||
public BossSlime(Player player) : base(player)
|
||||
public BossSlime(PlayerGameObject player) : base(player)
|
||||
{
|
||||
intelligence = intelligence + 5;
|
||||
strength = strength + 10;
|
||||
|
||||
@ -3,12 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Slimes
|
||||
{
|
||||
class ForestSlime : BasicSlime
|
||||
{
|
||||
public ForestSlime(Player player) : base(player)
|
||||
public ForestSlime(PlayerGameObject player) : base(player)
|
||||
{
|
||||
//intelligence = intelligence;
|
||||
//strength = strength;
|
||||
|
||||
@ -3,12 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Slimes
|
||||
{
|
||||
public class MageSlime : BasicSlime
|
||||
{
|
||||
public MageSlime(Player player) : base(player)
|
||||
public MageSlime(PlayerGameObject player) : base(player)
|
||||
{
|
||||
intelligence = intelligence + 2;
|
||||
strength = strength - 2;
|
||||
|
||||
@ -3,12 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Slimes
|
||||
{
|
||||
class MetalSlime : BasicSlime
|
||||
{
|
||||
public MetalSlime(Player player) : base(player)
|
||||
public MetalSlime(PlayerGameObject player) : base(player)
|
||||
{
|
||||
//intelligence = intelligence;
|
||||
strength = strength + 2;
|
||||
|
||||
@ -3,12 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Slimes
|
||||
{
|
||||
class MiniBossSlime : BasicSlime
|
||||
{
|
||||
public MiniBossSlime(Player player) : base(player)
|
||||
public MiniBossSlime(PlayerGameObject player) : base(player)
|
||||
{
|
||||
intelligence = intelligence + 3;
|
||||
strength = strength + 3;
|
||||
|
||||
@ -3,12 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Slimes
|
||||
{
|
||||
class NormalSlime : BasicSlime
|
||||
{
|
||||
public NormalSlime(Player player) : base(player)
|
||||
public NormalSlime(PlayerGameObject player) : base(player)
|
||||
{
|
||||
maxHealth = maxHealth + 10;
|
||||
health = maxHealth;
|
||||
|
||||
@ -3,42 +3,43 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Slimes
|
||||
{
|
||||
class SlimeFactory
|
||||
{
|
||||
public NormalSlime generateNormalSlime(Player player)
|
||||
public NormalSlime generateNormalSlime(PlayerGameObject player)
|
||||
{
|
||||
return new NormalSlime(player);
|
||||
}
|
||||
|
||||
public MageSlime generateMageSlime(Player player)
|
||||
public MageSlime generateMageSlime(PlayerGameObject player)
|
||||
{
|
||||
return new MageSlime(player);
|
||||
}
|
||||
|
||||
public MetalSlime generateMetalSlime(Player player)
|
||||
public MetalSlime generateMetalSlime(PlayerGameObject player)
|
||||
{
|
||||
return new MetalSlime(player);
|
||||
}
|
||||
|
||||
public MiniBossSlime generateMiniBossSlime(Player player)
|
||||
public MiniBossSlime generateMiniBossSlime(PlayerGameObject player)
|
||||
{
|
||||
return new MiniBossSlime(player);
|
||||
}
|
||||
|
||||
public WarriorSlime generateWarriorSlime(Player player)
|
||||
public WarriorSlime generateWarriorSlime(PlayerGameObject player)
|
||||
{
|
||||
return new WarriorSlime(player);
|
||||
}
|
||||
|
||||
public ForestSlime generateForestSlime(Player player)
|
||||
public ForestSlime generateForestSlime(PlayerGameObject player)
|
||||
{
|
||||
return new ForestSlime(player);
|
||||
}
|
||||
|
||||
public BossSlime generateBossSlime(Player player)
|
||||
public BossSlime generateBossSlime(PlayerGameObject player)
|
||||
{
|
||||
return new BossSlime(player);
|
||||
}
|
||||
|
||||
@ -3,12 +3,13 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Assets.Scripts.Player;
|
||||
|
||||
namespace Assets.Scripts.Slimes
|
||||
{
|
||||
class WarriorSlime : BasicSlime
|
||||
{
|
||||
public WarriorSlime(Player player) : base(player)
|
||||
public WarriorSlime(PlayerGameObject player) : base(player)
|
||||
{
|
||||
intelligence = intelligence - 2;
|
||||
strength = strength + 2;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 751c5cacb250e75659f0d758a42a016d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 15600000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 6a8efd3ad46a629fb871a2cb2d93566d
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 15600000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0a52adae5d772f7d0bfd83e0289b0ba3
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 15600000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b10cedcc8209111bebc4e847fcf35da0
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 15600000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
@ -1,8 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 51aa34e911071054887b24683e3e4458
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 15600000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@ -6,14 +6,14 @@ EditorUserSettings:
|
||||
serializedVersion: 4
|
||||
m_ConfigSettings:
|
||||
RecentlyUsedSceneGuid-0:
|
||||
value: 56060d5e5301505e0f5a5a2344200944154e4128792a2763297b4a30b2e2363a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 05550c040100590e5c0c097446220f164e164d732a7072682c2a1f31b7b7666c
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-2:
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 065551555651080c54570d2741715e1541154a79752925322f2c4965b7b0646d
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-2:
|
||||
value: 56060d5e5301505e0f5a5a2344200944154e4128792a2763297b4a30b2e2363a
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-3:
|
||||
value: 5a5757560101590a5d0c0e24427b5d44434e4c7a7b7a23677f2b4565b7b5353a
|
||||
flags: 0
|
||||
|
||||
@ -19,7 +19,7 @@ MonoBehaviour:
|
||||
width: 1920
|
||||
height: 1020
|
||||
m_ShowMode: 4
|
||||
m_Title: Game
|
||||
m_Title: Inspector
|
||||
m_RootView: {fileID: 2}
|
||||
m_MinSize: {x: 875, y: 300}
|
||||
m_MaxSize: {x: 10000, y: 10000}
|
||||
@ -119,7 +119,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 300, y: 100}
|
||||
m_MaxSize: {x: 24288, y: 16192}
|
||||
vertical: 0
|
||||
controlID: 40
|
||||
controlID: 116
|
||||
--- !u!114 &6
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@ -144,7 +144,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 200, y: 100}
|
||||
m_MaxSize: {x: 16192, y: 16192}
|
||||
vertical: 1
|
||||
controlID: 41
|
||||
controlID: 67
|
||||
--- !u!114 &7
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@ -169,7 +169,7 @@ MonoBehaviour:
|
||||
m_MinSize: {x: 200, y: 50}
|
||||
m_MaxSize: {x: 16192, y: 8096}
|
||||
vertical: 0
|
||||
controlID: 42
|
||||
controlID: 43
|
||||
--- !u!114 &8
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
@ -180,7 +180,7 @@ MonoBehaviour:
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 1
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_Name: SceneHierarchyWindow
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
@ -191,9 +191,9 @@ MonoBehaviour:
|
||||
height: 685
|
||||
m_MinSize: {x: 201, y: 221}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 15}
|
||||
m_ActualView: {fileID: 13}
|
||||
m_Panes:
|
||||
- {fileID: 15}
|
||||
- {fileID: 13}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &9
|
||||
@ -217,13 +217,13 @@ MonoBehaviour:
|
||||
height: 685
|
||||
m_MinSize: {x: 102, y: 121}
|
||||
m_MaxSize: {x: 4002, y: 4021}
|
||||
m_ActualView: {fileID: 17}
|
||||
m_ActualView: {fileID: 20}
|
||||
m_Panes:
|
||||
- {fileID: 14}
|
||||
- {fileID: 20}
|
||||
- {fileID: 15}
|
||||
- {fileID: 16}
|
||||
- {fileID: 17}
|
||||
- {fileID: 18}
|
||||
- {fileID: 19}
|
||||
- {fileID: 20}
|
||||
m_Selected: 1
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &10
|
||||
@ -247,64 +247,13 @@ MonoBehaviour:
|
||||
height: 285
|
||||
m_MinSize: {x: 231, y: 271}
|
||||
m_MaxSize: {x: 10001, y: 10021}
|
||||
m_ActualView: {fileID: 21}
|
||||
m_ActualView: {fileID: 18}
|
||||
m_Panes:
|
||||
- {fileID: 21}
|
||||
- {fileID: 14}
|
||||
- {fileID: 18}
|
||||
- {fileID: 12}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 1
|
||||
--- !u!114 &11
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Children:
|
||||
- {fileID: 12}
|
||||
- {fileID: 13}
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 1520
|
||||
y: 0
|
||||
width: 400
|
||||
height: 970
|
||||
m_MinSize: {x: 100, y: 100}
|
||||
m_MaxSize: {x: 8096, y: 16192}
|
||||
vertical: 1
|
||||
controlID: 117
|
||||
--- !u!114 &12
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name: SceneControlsWindow
|
||||
m_EditorClassIdentifier:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 0
|
||||
width: 400
|
||||
height: 136
|
||||
m_MinSize: {x: 101, y: 121}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 22}
|
||||
m_Panes:
|
||||
- {fileID: 22}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &13
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -319,18 +268,18 @@ MonoBehaviour:
|
||||
m_Children: []
|
||||
m_Position:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 136
|
||||
x: 1520
|
||||
y: 0
|
||||
width: 400
|
||||
height: 834
|
||||
height: 970
|
||||
m_MinSize: {x: 276, y: 71}
|
||||
m_MaxSize: {x: 4001, y: 4021}
|
||||
m_ActualView: {fileID: 23}
|
||||
m_ActualView: {fileID: 19}
|
||||
m_Panes:
|
||||
- {fileID: 23}
|
||||
- {fileID: 19}
|
||||
m_Selected: 0
|
||||
m_LastSelected: 0
|
||||
--- !u!114 &14
|
||||
--- !u!114 &12
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -364,7 +313,7 @@ MonoBehaviour:
|
||||
m_LastAppliedPresetName: Default
|
||||
m_SaveData: []
|
||||
m_OverlaysVisible: 1
|
||||
--- !u!114 &15
|
||||
--- !u!114 &13
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -401,9 +350,9 @@ MonoBehaviour:
|
||||
m_SceneHierarchy:
|
||||
m_TreeViewState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_SelectedIDs: c26c0000
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: a6cffeffb8d4feff9ed6feffcaddfeffe6defeff12e0feff32e1feff90eafeff
|
||||
m_ExpandedIDs: 20fbffff
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -419,7 +368,7 @@ MonoBehaviour:
|
||||
m_IsRenaming: 0
|
||||
m_OriginalEventType: 11
|
||||
m_IsRenamingFilename: 0
|
||||
m_ClientGUIView: {fileID: 8}
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_SearchString:
|
||||
m_ExpandedScenes: []
|
||||
m_CurrenRootInstanceID: 0
|
||||
@ -427,7 +376,7 @@ MonoBehaviour:
|
||||
m_IsLocked: 0
|
||||
m_CurrentSortingName: TransformSorting
|
||||
m_WindowGUID: 6f1193b7c6ac3e64ca0e317b16d20212
|
||||
--- !u!114 &16
|
||||
--- !u!114 &14
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -447,10 +396,10 @@ MonoBehaviour:
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 306
|
||||
y: 90
|
||||
x: 2226
|
||||
y: 118
|
||||
width: 1212
|
||||
height: 664
|
||||
height: 644
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -491,7 +440,7 @@ MonoBehaviour:
|
||||
floating: 0
|
||||
collapsed: 0
|
||||
displayed: 1
|
||||
snapOffset: {x: 0, y: 0}
|
||||
snapOffset: {x: 0, y: 25}
|
||||
snapOffsetDelta: {x: 0, y: 0}
|
||||
snapCorner: 0
|
||||
id: unity-scene-view-toolbar
|
||||
@ -720,16 +669,16 @@ MonoBehaviour:
|
||||
layout: 4
|
||||
size: {x: 0, y: 0}
|
||||
sizeOverriden: 0
|
||||
- dockPosition: 1
|
||||
containerId: overlay-container--right
|
||||
floating: 0
|
||||
- dockPosition: 0
|
||||
containerId: Floating
|
||||
floating: 1
|
||||
collapsed: 0
|
||||
displayed: 1
|
||||
snapOffset: {x: 48, y: 48}
|
||||
displayed: 0
|
||||
snapOffset: {x: -392.26807, y: -264.45514}
|
||||
snapOffsetDelta: {x: 0, y: 0}
|
||||
snapCorner: 0
|
||||
snapCorner: 3
|
||||
id: AINavigationOverlay
|
||||
index: 7
|
||||
index: 1
|
||||
layout: 4
|
||||
size: {x: 0, y: 0}
|
||||
sizeOverriden: 0
|
||||
@ -742,7 +691,7 @@ MonoBehaviour:
|
||||
snapOffsetDelta: {x: 0, y: 0}
|
||||
snapCorner: 0
|
||||
id: Scene View/TrailRenderer
|
||||
index: 8
|
||||
index: 7
|
||||
layout: 4
|
||||
size: {x: 0, y: 0}
|
||||
sizeOverriden: 0
|
||||
@ -765,14 +714,14 @@ MonoBehaviour:
|
||||
m_OverrideSceneCullingMask: 6917529027641081856
|
||||
m_SceneIsLit: 1
|
||||
m_SceneLighting: 1
|
||||
m_2DMode: 0
|
||||
m_2DMode: 1
|
||||
m_isRotationLocked: 0
|
||||
m_PlayAudio: 0
|
||||
m_AudioPlay: 0
|
||||
m_Position:
|
||||
m_Target: {x: -226.4418, y: -253.85118, z: 861.5535}
|
||||
m_Target: {x: 963.93134, y: 540.3141, z: 10.1945715}
|
||||
speed: 2
|
||||
m_Value: {x: -226.4418, y: -253.85118, z: 861.5535}
|
||||
m_Value: {x: 963.93134, y: 540.3141, z: 10.1945715}
|
||||
m_RenderMode: 0
|
||||
m_CameraMode:
|
||||
drawMode: 0
|
||||
@ -800,17 +749,17 @@ MonoBehaviour:
|
||||
m_Size: {x: 0, y: 0}
|
||||
yGrid:
|
||||
m_Fade:
|
||||
m_Target: 1
|
||||
m_Target: 0
|
||||
speed: 2
|
||||
m_Value: 1
|
||||
m_Value: 0
|
||||
m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4}
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Size: {x: 1, y: 1}
|
||||
zGrid:
|
||||
m_Fade:
|
||||
m_Target: 0
|
||||
m_Target: 1
|
||||
speed: 2
|
||||
m_Value: 0
|
||||
m_Value: 1
|
||||
m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4}
|
||||
m_Pivot: {x: 0, y: 0, z: 0}
|
||||
m_Size: {x: 1, y: 1}
|
||||
@ -818,17 +767,17 @@ MonoBehaviour:
|
||||
m_GridAxis: 1
|
||||
m_gridOpacity: 0.5
|
||||
m_Rotation:
|
||||
m_Target: {x: 0.14660643, y: -0.091043964, z: 0.015109609, w: 0.9844031}
|
||||
m_Target: {x: 0, y: 0, z: 0, w: 1}
|
||||
speed: 2
|
||||
m_Value: {x: 0.14667538, y: -0.091086775, z: 0.015116714, w: 0.984866}
|
||||
m_Value: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_Size:
|
||||
m_Target: 458.9204
|
||||
m_Target: 544.3202
|
||||
speed: 2
|
||||
m_Value: 458.9204
|
||||
m_Value: 544.3202
|
||||
m_Ortho:
|
||||
m_Target: 0
|
||||
m_Target: 1
|
||||
speed: 2
|
||||
m_Value: 0
|
||||
m_Value: 1
|
||||
m_CameraSettings:
|
||||
m_Speed: 0.9452999
|
||||
m_SpeedNormalized: 0.46999997
|
||||
@ -842,112 +791,14 @@ MonoBehaviour:
|
||||
m_FarClip: 10000
|
||||
m_DynamicClip: 1
|
||||
m_OcclusionCulling: 0
|
||||
m_LastSceneViewRotation: {x: 0.028054088, y: -0.89433724, z: -0.056315146, w: -0.44282255}
|
||||
m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
|
||||
m_LastSceneViewOrtho: 0
|
||||
m_ReplacementShader: {fileID: 0}
|
||||
m_ReplacementString:
|
||||
m_SceneVisActive: 1
|
||||
m_LastLockedObject: {fileID: 0}
|
||||
m_ViewIsLockedToObject: 0
|
||||
--- !u!114 &17
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_MinSize: {x: 100, y: 100}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_TitleContent:
|
||||
m_Text: Game
|
||||
m_Image: {fileID: -6423792434712278376, guid: 0000000000000000d000000000000000, type: 0}
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 306
|
||||
y: 90
|
||||
width: 1212
|
||||
height: 664
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
m_SupportedDataModes:
|
||||
isAutomatic: 1
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
m_SaveData: []
|
||||
m_OverlaysVisible: 1
|
||||
m_SerializedViewNames: []
|
||||
m_SerializedViewValues: []
|
||||
m_PlayModeViewName: GameView
|
||||
m_ShowGizmos: 1
|
||||
m_TargetDisplay: 0
|
||||
m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_TargetSize: {x: 1920, y: 1080}
|
||||
m_TextureFilterMode: 0
|
||||
m_TextureHideFlags: 61
|
||||
m_RenderIMGUI: 1
|
||||
m_EnterPlayModeBehavior: 2
|
||||
m_UseMipMap: 0
|
||||
m_VSyncEnabled: 0
|
||||
m_Gizmos: 1
|
||||
m_Stats: 0
|
||||
m_SelectedSizes: 03000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
m_ZoomArea:
|
||||
m_HRangeLocked: 0
|
||||
m_VRangeLocked: 0
|
||||
hZoomLockedByDefault: 0
|
||||
vZoomLockedByDefault: 0
|
||||
m_HBaseRangeMin: -960
|
||||
m_HBaseRangeMax: 960
|
||||
m_VBaseRangeMin: -540
|
||||
m_VBaseRangeMax: 540
|
||||
m_HAllowExceedBaseRangeMin: 1
|
||||
m_HAllowExceedBaseRangeMax: 1
|
||||
m_VAllowExceedBaseRangeMin: 1
|
||||
m_VAllowExceedBaseRangeMax: 1
|
||||
m_ScaleWithWindow: 0
|
||||
m_HSlider: 0
|
||||
m_VSlider: 0
|
||||
m_IgnoreScrollWheelUntilClicked: 0
|
||||
m_EnableMouseInput: 1
|
||||
m_EnableSliderZoomHorizontal: 0
|
||||
m_EnableSliderZoomVertical: 0
|
||||
m_UniformScale: 1
|
||||
m_UpDirection: 1
|
||||
m_DrawArea:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 21
|
||||
width: 1212
|
||||
height: 643
|
||||
m_Scale: {x: 0.59537035, y: 0.59537035}
|
||||
m_Translation: {x: 606, y: 321.5}
|
||||
m_MarginLeft: 0
|
||||
m_MarginRight: 0
|
||||
m_MarginTop: 0
|
||||
m_MarginBottom: 0
|
||||
m_LastShownAreaInsideMargins:
|
||||
serializedVersion: 2
|
||||
x: -1017.8538
|
||||
y: -540
|
||||
width: 2035.7076
|
||||
height: 1080
|
||||
m_MinimalGUI: 1
|
||||
m_defaultScale: 0.59537035
|
||||
m_LastWindowPixelSize: {x: 1212, y: 664}
|
||||
m_ClearInEditMode: 1
|
||||
m_NoCameraWarning: 1
|
||||
m_LowResolutionForAspectRatios: 01000000000000000000
|
||||
m_XRRenderMode: 0
|
||||
m_RenderTexture: {fileID: 0}
|
||||
--- !u!114 &18
|
||||
--- !u!114 &15
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -1519,7 +1370,7 @@ MonoBehaviour:
|
||||
m_Text: Input (Input Actions)
|
||||
m_Image: {fileID: 0}
|
||||
m_Tooltip:
|
||||
--- !u!114 &19
|
||||
--- !u!114 &16
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -1575,7 +1426,7 @@ MonoBehaviour:
|
||||
m_IsRenamingFilename: 0
|
||||
m_ClientGUIView: {fileID: 0}
|
||||
m_SearchString:
|
||||
--- !u!114 &20
|
||||
--- !u!114 &17
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -1609,7 +1460,7 @@ MonoBehaviour:
|
||||
m_LastAppliedPresetName: Default
|
||||
m_SaveData: []
|
||||
m_OverlaysVisible: 1
|
||||
--- !u!114 &21
|
||||
--- !u!114 &18
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -1654,7 +1505,7 @@ MonoBehaviour:
|
||||
m_SkipHidden: 0
|
||||
m_SearchArea: 1
|
||||
m_Folders:
|
||||
- Assets/Scenes
|
||||
- Assets/Scripts
|
||||
m_Globs: []
|
||||
m_OriginalText:
|
||||
m_ImportLogFlags: 0
|
||||
@ -1662,16 +1513,16 @@ MonoBehaviour:
|
||||
m_ViewMode: 1
|
||||
m_StartGridSize: 64
|
||||
m_LastFolders:
|
||||
- Assets/Scenes
|
||||
- Assets/Scripts
|
||||
m_LastFoldersGridSize: -1
|
||||
m_LastProjectPath: /home/nicola/Schreibtisch/TalesOfNovariel
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_FolderTreeState:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs: 24070000
|
||||
m_LastClickedID: 1828
|
||||
m_ExpandedIDs: 000000002406000000ca9a3b
|
||||
scrollPos: {x: 0, y: 32}
|
||||
m_SelectedIDs: 466c0000
|
||||
m_LastClickedID: 27718
|
||||
m_ExpandedIDs: 00000000966b000000ca9a3b
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -1699,7 +1550,7 @@ MonoBehaviour:
|
||||
scrollPos: {x: 0, y: 0}
|
||||
m_SelectedIDs:
|
||||
m_LastClickedID: 0
|
||||
m_ExpandedIDs: 000000002406000074060000
|
||||
m_ExpandedIDs: 00000000966b0000
|
||||
m_RenameOverlay:
|
||||
m_UserAcceptedRename: 0
|
||||
m_Name:
|
||||
@ -1755,41 +1606,7 @@ MonoBehaviour:
|
||||
m_GridSize: 64
|
||||
m_SkipHiddenPackages: 0
|
||||
m_DirectoriesAreaWidth: 335
|
||||
--- !u!114 &22
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 4d0eea65a4b934e48b2b8115dcfbac57, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_MinSize: {x: 100, y: 100}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_TitleContent:
|
||||
m_Text: Localization Scene Controls
|
||||
m_Image: {fileID: 0}
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 1520
|
||||
y: 90
|
||||
width: 399
|
||||
height: 115
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
m_SupportedDataModes:
|
||||
isAutomatic: 1
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
m_SaveData: []
|
||||
m_OverlaysVisible: 1
|
||||
--- !u!114 &23
|
||||
--- !u!114 &19
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
@ -1810,9 +1627,9 @@ MonoBehaviour:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 1520
|
||||
y: 226
|
||||
y: 90
|
||||
width: 399
|
||||
height: 813
|
||||
height: 949
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
@ -1836,3 +1653,103 @@ MonoBehaviour:
|
||||
m_LockTracker:
|
||||
m_IsLocked: 0
|
||||
m_PreviewWindow: {fileID: 0}
|
||||
--- !u!114 &20
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 52
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 12015, guid: 0000000000000000e000000000000000, type: 0}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_MinSize: {x: 100, y: 100}
|
||||
m_MaxSize: {x: 4000, y: 4000}
|
||||
m_TitleContent:
|
||||
m_Text: Game
|
||||
m_Image: {fileID: -6423792434712278376, guid: 0000000000000000d000000000000000, type: 0}
|
||||
m_Tooltip:
|
||||
m_Pos:
|
||||
serializedVersion: 2
|
||||
x: 306
|
||||
y: 90
|
||||
width: 1212
|
||||
height: 664
|
||||
m_SerializedDataModeController:
|
||||
m_DataMode: 0
|
||||
m_PreferredDataMode: 0
|
||||
m_SupportedDataModes:
|
||||
isAutomatic: 1
|
||||
m_ViewDataDictionary: {fileID: 0}
|
||||
m_OverlayCanvas:
|
||||
m_LastAppliedPresetName: Default
|
||||
m_SaveData: []
|
||||
m_OverlaysVisible: 1
|
||||
m_SerializedViewNames:
|
||||
- UnityEditor.DeviceSimulation.SimulatorWindow
|
||||
m_SerializedViewValues:
|
||||
- /home/nicola/Schreibtisch/TalesOfNovariel/Library/PlayModeViewStates/73794f0e7d30a59fe8d0dbd0d2ea0bd5
|
||||
m_PlayModeViewName: GameView
|
||||
m_ShowGizmos: 1
|
||||
m_TargetDisplay: 0
|
||||
m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
|
||||
m_TargetSize: {x: 1920, y: 1080}
|
||||
m_TextureFilterMode: 0
|
||||
m_TextureHideFlags: 61
|
||||
m_RenderIMGUI: 1
|
||||
m_EnterPlayModeBehavior: 0
|
||||
m_UseMipMap: 0
|
||||
m_VSyncEnabled: 0
|
||||
m_Gizmos: 1
|
||||
m_Stats: 0
|
||||
m_SelectedSizes: 03000000000000000000000000000000000000000000000000000000000000000000000000000000
|
||||
m_ZoomArea:
|
||||
m_HRangeLocked: 0
|
||||
m_VRangeLocked: 0
|
||||
hZoomLockedByDefault: 0
|
||||
vZoomLockedByDefault: 0
|
||||
m_HBaseRangeMin: -960
|
||||
m_HBaseRangeMax: 960
|
||||
m_VBaseRangeMin: -540
|
||||
m_VBaseRangeMax: 540
|
||||
m_HAllowExceedBaseRangeMin: 1
|
||||
m_HAllowExceedBaseRangeMax: 1
|
||||
m_VAllowExceedBaseRangeMin: 1
|
||||
m_VAllowExceedBaseRangeMax: 1
|
||||
m_ScaleWithWindow: 0
|
||||
m_HSlider: 0
|
||||
m_VSlider: 0
|
||||
m_IgnoreScrollWheelUntilClicked: 0
|
||||
m_EnableMouseInput: 1
|
||||
m_EnableSliderZoomHorizontal: 0
|
||||
m_EnableSliderZoomVertical: 0
|
||||
m_UniformScale: 1
|
||||
m_UpDirection: 1
|
||||
m_DrawArea:
|
||||
serializedVersion: 2
|
||||
x: 0
|
||||
y: 21
|
||||
width: 1212
|
||||
height: 643
|
||||
m_Scale: {x: 0.59537035, y: 0.59537035}
|
||||
m_Translation: {x: 606, y: 321.5}
|
||||
m_MarginLeft: 0
|
||||
m_MarginRight: 0
|
||||
m_MarginTop: 0
|
||||
m_MarginBottom: 0
|
||||
m_LastShownAreaInsideMargins:
|
||||
serializedVersion: 2
|
||||
x: -1017.8538
|
||||
y: -540
|
||||
width: 2035.7076
|
||||
height: 1080
|
||||
m_MinimalGUI: 1
|
||||
m_defaultScale: 0.59537035
|
||||
m_LastWindowPixelSize: {x: 1212, y: 664}
|
||||
m_ClearInEditMode: 1
|
||||
m_NoCameraWarning: 1
|
||||
m_LowResolutionForAspectRatios: 01000000000000000000
|
||||
m_XRRenderMode: 0
|
||||
m_RenderTexture: {fileID: 0}
|
||||
|
||||
122
save.json
122
save.json
@ -1,30 +1,30 @@
|
||||
{
|
||||
"player": {
|
||||
"playername": "Nicola",
|
||||
"maxHealth": 120,
|
||||
"maxSecondary": 30,
|
||||
"secondary": 38,
|
||||
"health": 130,
|
||||
"strength": 10,
|
||||
"playername": "",
|
||||
"maxHealth": 110,
|
||||
"maxSecondary": 10,
|
||||
"secondary": 50,
|
||||
"health": 310,
|
||||
"strength": 7,
|
||||
"dexterity": 5,
|
||||
"intelligence": 3,
|
||||
"level": 3,
|
||||
"experience": 56,
|
||||
"maxExperience": 80,
|
||||
"level": 0,
|
||||
"experience": 0,
|
||||
"maxExperience": 10,
|
||||
"race": "Human",
|
||||
"role": "Warrior",
|
||||
"points": 0,
|
||||
"healthRegen": 30,
|
||||
"secondaryRegen": 5,
|
||||
"isDodging": "False",
|
||||
"killcount": 5,
|
||||
"luck": 26,
|
||||
"killcount": -1,
|
||||
"luck": 20,
|
||||
"difficulty": 0
|
||||
},
|
||||
"world": {
|
||||
"cityAmount": 5,
|
||||
"maxCityAmount": 5,
|
||||
"currentTile": "0/0/1",
|
||||
"currentTile": "0/0/0",
|
||||
"map": {
|
||||
"tile0": "./save/tile0.json"
|
||||
}
|
||||
@ -33,121 +33,67 @@
|
||||
"equipment": {
|
||||
"head": "empty",
|
||||
"rightHand": "empty",
|
||||
"leftHand": {
|
||||
"rarity": "LEGENDARY",
|
||||
"place": "LEFTHAND",
|
||||
"itemName": "Greatshield (legendary)",
|
||||
"MPR": 3,
|
||||
"HPR": 3,
|
||||
"MP": 3,
|
||||
"HP": 3,
|
||||
"STR": 3,
|
||||
"DEX": 3,
|
||||
"INT": 3,
|
||||
"LCK": 3
|
||||
},
|
||||
"leftHand": "empty",
|
||||
"amulet": "empty",
|
||||
"feet": "empty",
|
||||
"shoulders": "empty",
|
||||
"chest": {
|
||||
"rarity": "RARE",
|
||||
"place": "ARMOR",
|
||||
"itemName": "Armor of health attribute (rare)",
|
||||
"HP": 10,
|
||||
"MP": 8
|
||||
},
|
||||
"ring": "empty"
|
||||
"chest": "empty",
|
||||
"ring": "empty",
|
||||
|
||||
},
|
||||
"bags": {
|
||||
"slot0": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot1": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot2": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot3": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot4": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot5": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot6": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot7": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot8": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot9": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot10": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot11": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot12": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot13": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot14": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot15": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot16": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
},
|
||||
"slot17": {
|
||||
"bag1": "empty",
|
||||
"bag2": "empty",
|
||||
"bag3": "empty"
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Resolution:1
|
||||
Resolution:2
|
||||
Mode:0
|
||||
Language:de
|
||||
Music:0
|
||||
Effects:0
|
||||
SensitivityMouse:1
|
||||
SensitivityController:2
|
||||
SensitivityController:6.234979
|
||||
Loading…
x
Reference in New Issue
Block a user