BUILD FIX - chests position

This commit is contained in:
kabix09 2022-12-13 01:03:03 +01:00
parent 366cccf79f
commit b61f7bd694
9 changed files with 495 additions and 30 deletions

View File

@ -74,8 +74,12 @@ public class NewGame : MonoBehaviour
foreach (FileInfo file in di.GetFiles()) foreach (FileInfo file in di.GetFiles())
{ {
if (file.FullName.Contains("Player.log"))
continue;
file.Delete(); file.Delete();
} }
foreach (DirectoryInfo dir in di.GetDirectories()) foreach (DirectoryInfo dir in di.GetDirectories())
{ {
dir.Delete(true); dir.Delete(true);

View File

@ -29,6 +29,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.19999695, z: -1.8041458} m_LocalPosition: {x: 0, y: 0.19999695, z: -1.8041458}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 5754902894522036728} m_Father: {fileID: 5754902894522036728}
m_RootOrder: 0 m_RootOrder: 0
@ -111,6 +112,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 16, y: 51.2, z: 18.195854} m_LocalPosition: {x: 16, y: 51.2, z: 18.195854}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 584661738} - {fileID: 584661738}
m_Father: {fileID: 0} m_Father: {fileID: 0}
@ -127,6 +129,7 @@ SpriteRenderer:
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1 m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1

View File

@ -29,6 +29,7 @@ Transform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: [] m_Children: []
m_Father: {fileID: 3972494989842158580} m_Father: {fileID: 3972494989842158580}
m_RootOrder: 0 m_RootOrder: 0
@ -111,7 +112,8 @@ Transform:
m_GameObject: {fileID: 3972494989842158579} m_GameObject: {fileID: 3972494989842158579}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -8.45, y: -3.9, z: 10} m_LocalPosition: {x: -8.45, y: -3.9, z: 10}
m_LocalScale: {x: 0.5, y: 0.5, z: 1} m_LocalScale: {x: 1, y: 1, z: 2}
m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 1698721847} - {fileID: 1698721847}
m_Father: {fileID: 0} m_Father: {fileID: 0}
@ -128,6 +130,7 @@ SpriteRenderer:
m_CastShadows: 0 m_CastShadows: 0
m_ReceiveShadows: 0 m_ReceiveShadows: 0
m_DynamicOccludee: 1 m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1 m_MotionVectors: 1
m_LightProbeUsage: 1 m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1 m_ReflectionProbeUsage: 1

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -10,10 +10,14 @@ public class AnimatedDoorBehaviour : TriggerDoor
[SerializeField] [SerializeField]
public Gateway gateway; public Gateway gateway;
public string DoorOpenAnimatorParamName = "DoorOpen";
Animator animator; Animator animator;
void Awake()
{
DoorOpenAnimatorParamName = "DoorOpen";
}
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {

View File

@ -3,7 +3,6 @@ using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using GUI_Scripts.ProceduralGeneration; using GUI_Scripts.ProceduralGeneration;
using UnityEditor.MemoryProfiler;
using UnityEngine; using UnityEngine;
public class Graph public class Graph

View File

@ -10,7 +10,7 @@ public class SceneChestBuilder : SceneObjectBuilder<ChestPrefabAsset>
public override void Build(ChestPrefabAsset objectToBuild) public override void Build(ChestPrefabAsset objectToBuild)
{ {
GameObject globalGUI = GameObject.FindGameObjectsWithTag("GUI")[0]; GameObject globalGUI = GameObject.FindGameObjectWithTag("ChestCollection");
if (!globalGUI) if (!globalGUI)
Debug.LogError("GUI frame not found!!"); Debug.LogError("GUI frame not found!!");
@ -27,8 +27,13 @@ public class SceneChestBuilder : SceneObjectBuilder<ChestPrefabAsset>
GameObject chest = Instantiate(newObject, objectToBuild.Position, Quaternion.identity, globalGUI.transform); GameObject chest = Instantiate(newObject, objectToBuild.Position, Quaternion.identity, globalGUI.transform);
chest.name = objectToBuild.Chest.Name; chest.name = objectToBuild.Chest.Name;
chest.transform.localScale = new Vector3(0.5f, 0.5f, 1f); chest.transform.SetParent(globalGUI.transform);
chest.transform.localPosition = objectToBuild.Position;
//Debug.Log("Chest Name: " + chest.name + " Positions: " + chest.transform.position.x + " + " + chest.transform.position.y + " + " + chest.transform.position.z);
//Debug.Log("Chest Name: " + chest.name + " Local Positions: " + chest.transform.localPosition.x + " + " + chest.transform.localPosition.y + " + " + chest.transform.localPosition.z);
//chest.transform.localScale = new Vector3(1f, 1f, 1f);
//chest.transform.localPosition = objectToBuild.Position;
// data about chest cpontent should be handled in SceneChestManager class and pass to ChestUIPanel only after opening Panel by Player // data about chest cpontent should be handled in SceneChestManager class and pass to ChestUIPanel only after opening Panel by Player

View File

@ -57,9 +57,15 @@ public class NPCManager : MonoBehaviour
foreach (var thug in thugs) foreach (var thug in thugs)
{ {
var ThugClone = GameObject.Instantiate(model, thug.position, Quaternion.identity, NPCCollection.transform); var ThugClone = GameObject.Instantiate(model, thug.position, Quaternion.identity, NPCCollection.transform);
Debug.Log(thug.position);
ThugClone.name = thug.name; ThugClone.name = thug.name;
ThugClone.transform.SetParent(NPCCollection.transform); ThugClone.transform.SetParent(NPCCollection.transform);
//Debug.Log("Thug Name: " + ThugClone.name + " Positions: " + ThugClone.transform.position.x + " + " + ThugClone.transform.position.y + " + " + ThugClone.transform.position.z);
//Debug.Log("Thug Name: " + ThugClone.name + " Local Positions: " + ThugClone.transform.localPosition.x + " + " + ThugClone.transform.localPosition.y + " + " + ThugClone.transform.localPosition.z);
ThugClone.GetComponent<FollowingEnemy>().enemyName = thug.name; //delete and set in the controller todo? ThugClone.GetComponent<FollowingEnemy>().enemyName = thug.name; //delete and set in the controller todo?
ThugClone.GetComponent<FollowingEnemy>().isKilled = PlayerPrefs.HasKey(thug.name + "-S") ? PlayerPrefs.GetInt(thug.name + "-S") : 0; ThugClone.GetComponent<FollowingEnemy>().isKilled = PlayerPrefs.HasKey(thug.name + "-S") ? PlayerPrefs.GetInt(thug.name + "-S") : 0;