massive number of fixes, removed compilation error, logs, negative scale issues, serialization issues ETC
This commit is contained in:
@@ -96,7 +96,7 @@ namespace Beyond
|
||||
private Shader m_transparent;
|
||||
private Shader m_opaque;
|
||||
private int m_thresholID = Shader.PropertyToID("_Threshold");
|
||||
private int m_baseColorID = Shader.PropertyToID("BaseColor");
|
||||
private int m_baseColorID = Shader.PropertyToID("_BaseColor");
|
||||
private int m_FresnelColorID = Shader.PropertyToID("_FresnelColor");
|
||||
private int m_FresnelPowerID = Shader.PropertyToID("FresnelPower");
|
||||
private int m_InvisibilityID = Shader.PropertyToID("_Invisibility");
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace Beyond
|
||||
|
||||
[SerializeField] private new Renderer renderer;
|
||||
|
||||
private string colorString = "BaseColor";
|
||||
private string colorString = "_BaseColor";
|
||||
|
||||
public float movementDuration = 9f;
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ namespace Beyond
|
||||
[SerializeField] public MenuScroll menuScroll;
|
||||
|
||||
// [SerializeField]
|
||||
private int faithRegenValue = 1;
|
||||
//private int faithRegenValue = 1;
|
||||
|
||||
// private float faithRegenTime = 1f;
|
||||
// private float faithCurrentTime = 0f;
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CollisionEventTrigger : MonoBehaviour
|
||||
|
||||
if (useTagFilter && collision.gameObject.tag != targetTag)
|
||||
{
|
||||
Debug.Log("Collision with object with different tag.");
|
||||
//Debug.Log("Collision with object with different tag.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ public class CollisionEventTrigger : MonoBehaviour
|
||||
// Check if the event is assigned (not null)
|
||||
if (OnCollisionEnterEvent != null)
|
||||
{
|
||||
Debug.Log("Event is being invoked.");
|
||||
//Debug.Log("Event is being invoked.");
|
||||
// Invoke the event
|
||||
OnCollisionEnterEvent.Invoke();
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Beyond
|
||||
|
||||
private const string SEQUENCE_END_TAG = "QTEEnd";
|
||||
|
||||
private bool startedFade = false;
|
||||
//private bool startedFade = false;
|
||||
|
||||
public bool IsSequenceRunning { get => m_isSequenceRunning; }
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Beyond
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = this;
|
||||
DontDestroyOnLoad(gameObject);
|
||||
//DontDestroyOnLoad(gameObject);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ public static class CustomHierarchyDecorator
|
||||
return;
|
||||
}
|
||||
|
||||
Debug.Log("HierarchyDecoratorSettings loaded successfully.");
|
||||
//Debug.Log("HierarchyDecoratorSettings loaded successfully.");
|
||||
}
|
||||
|
||||
// Rysowanie nag³ówka
|
||||
|
||||
@@ -78,8 +78,8 @@ namespace Beyond
|
||||
m_meleeManager.onDamageHit.RemoveListener(OnDamageHit);
|
||||
m_meleeManager.onRecoilHit.RemoveListener(OnDamageHit);
|
||||
}
|
||||
if (m_postProcessType == PostProcessType.ON_COMBAT)
|
||||
GameStateManager.Instance.m_OnStateChanged.AddListener(OnGameStateChange);
|
||||
if (m_postProcessType == PostProcessType.ON_COMBAT && GameStateManager.Instance != null)
|
||||
GameStateManager.Instance.m_OnStateChanged.RemoveListener(OnGameStateChange);
|
||||
}
|
||||
|
||||
[Button]
|
||||
|
||||
@@ -10,6 +10,7 @@ using Sirenix.OdinInspector;
|
||||
using SRF.Components;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
namespace Beyond
|
||||
{
|
||||
@@ -50,6 +51,7 @@ namespace Beyond
|
||||
}
|
||||
|
||||
private static GameStateManager s_instance = null;
|
||||
private static bool s_isDestroyed = false;
|
||||
private float m_enemyDamageModifier = 1f;
|
||||
public SaveData m_saveData = new();
|
||||
private HashSet<string> m_CompabStates;
|
||||
@@ -63,6 +65,11 @@ namespace Beyond
|
||||
{
|
||||
return s_instance;
|
||||
}
|
||||
else if (s_isDestroyed)
|
||||
{
|
||||
//don't recreate object after scene destorys it
|
||||
return null;
|
||||
}
|
||||
else
|
||||
{
|
||||
var inst = FindObjectOfType<GameStateManager>();
|
||||
@@ -80,7 +87,13 @@ namespace Beyond
|
||||
return s_instance;
|
||||
}
|
||||
}
|
||||
|
||||
//public void OnSc
|
||||
public override void OnDestroy()
|
||||
{
|
||||
base.OnDestroy();
|
||||
s_isDestroyed = true;
|
||||
// Debug.Log("Destroying GameStateManager");
|
||||
}
|
||||
//[ShowInInspector]
|
||||
public Difficulty GameDifficulty => m_saveData.difficulty;
|
||||
|
||||
@@ -95,7 +108,7 @@ namespace Beyond
|
||||
Destroy(this);
|
||||
return;
|
||||
}
|
||||
|
||||
SceneManager.sceneLoaded += SceneManager_sceneUnloaded;
|
||||
s_instance = this;
|
||||
//SetDifficulty(Difficulty.NORMAL);
|
||||
m_CompabStates = new HashSet<string>();
|
||||
@@ -109,6 +122,11 @@ namespace Beyond
|
||||
m_IdleStates.Add("Flee");
|
||||
m_IdleStates.Add("Patrol");
|
||||
}
|
||||
//reset isDestroyed, so object can be recreated for the next scene
|
||||
private void SceneManager_sceneUnloaded(Scene arg0, LoadSceneMode arg1)
|
||||
{
|
||||
s_isDestroyed = false;
|
||||
}
|
||||
|
||||
public enum State
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Beyond
|
||||
return;
|
||||
}
|
||||
m_bendEffectMax = m_material.GetFloat("_BendEffect");
|
||||
m_initialColor = m_material.GetColor("BaseColor");
|
||||
m_initialColor = m_material.GetColor("_BaseColor");
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
@@ -43,7 +43,7 @@ namespace Beyond
|
||||
{
|
||||
base.Heal();
|
||||
m_material.DOFloat(0f, "_BendEffect", m_healTime).SetEase(m_easeType);
|
||||
m_material.DOColor(m_targetColor, "BaseColor", m_healTime);
|
||||
m_material.DOColor(m_targetColor, "_BaseColor", m_healTime);
|
||||
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Beyond
|
||||
{
|
||||
base.Unheal();
|
||||
m_material.DOFloat(m_bendEffectMax, "_BendEffect", m_healTime);//.SetEase(Ease.InOutElastic);
|
||||
m_material.DOColor(m_initialColor, "BaseColor", m_healTime);
|
||||
m_material.DOColor(m_initialColor, "_BaseColor", m_healTime);
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Beyond
|
||||
{
|
||||
public class bThirdPersonController : vThirdPersonController
|
||||
{
|
||||
public bool triggerDieBehaviour = false;
|
||||
//public bool triggerDieBehaviour = false;
|
||||
protected bool m_isDashing;
|
||||
protected bool m_GodMode = false;
|
||||
|
||||
@@ -208,7 +208,8 @@ namespace Beyond
|
||||
base.OnTriggerExit(other);
|
||||
}
|
||||
|
||||
|
||||
//animation event handling
|
||||
void DrawWeaponLowLeft() { }
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@ public class PostProcessController : MonoBehaviour
|
||||
// Funkcja p<>ynnie w<><77>cza efekt post-processingu (od 0 do 1) w czasie ustawionym w duration
|
||||
public void EnablePostProcessing()
|
||||
{
|
||||
if (volume != null)
|
||||
if (volume != null && isActiveAndEnabled)
|
||||
{
|
||||
// Je<4A>li ju<6A> jest jaka<6B> coroutina w trakcie, zatrzymujemy j<>
|
||||
if (currentCoroutine != null)
|
||||
|
||||
@@ -23,6 +23,10 @@ namespace Beyond
|
||||
if (i < treesStateData.Count)
|
||||
{
|
||||
treeControllers[i].health = treesStateData[i].health;
|
||||
if (!treeControllers[i].isActiveAndEnabled && treesStateData[i].isEnabled)
|
||||
{
|
||||
treeControllers[i].gameObject.SetActiveUpHierarchy(true);
|
||||
}
|
||||
treeControllers[i].SetTreeStateInstant(treesStateData[i].treeState);
|
||||
}
|
||||
}
|
||||
@@ -31,7 +35,7 @@ namespace Beyond
|
||||
public override string RecordData()
|
||||
{
|
||||
List<TreeStateData> treesStateData = new();
|
||||
treeControllers.ForEach(controller => treesStateData.Add(new TreeStateData(controller.currentTreeState, controller.health)));
|
||||
treeControllers.ForEach(controller => treesStateData.Add(new TreeStateData(controller.currentTreeState, controller.health, controller.isActiveAndEnabled)));
|
||||
TreesDataContainer treesDataContainer = new();
|
||||
treesDataContainer.treesData = treesStateData;
|
||||
Debug.Log(treesStateData.Count);
|
||||
|
||||
@@ -34,11 +34,13 @@ namespace Beyond
|
||||
{
|
||||
public TreeState treeState;
|
||||
public float health = 100;
|
||||
public bool isEnabled = true;
|
||||
|
||||
public TreeStateData(TreeState treeState, float health)
|
||||
public TreeStateData(TreeState treeState, float health, bool isEnabled)
|
||||
{
|
||||
this.treeState = treeState;
|
||||
this.health = health;
|
||||
this.isEnabled = isEnabled;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,8 +75,8 @@ namespace Beyond
|
||||
[SerializeField] private List<Renderer> woodRenderers, leavesRenderers;
|
||||
private List<Material> woodMaterials = new(), leavesMaterials = new();
|
||||
|
||||
private string woodColorName = "BaseColor",
|
||||
leavesColorName = "BaseColor";
|
||||
private string woodColorName = "_BaseColor",
|
||||
leavesColorName = "_BaseColor";
|
||||
|
||||
[SerializeField] public bItemListData items;
|
||||
|
||||
@@ -251,13 +253,17 @@ namespace Beyond
|
||||
}
|
||||
|
||||
currentTreeState = treeState;
|
||||
if (instant)
|
||||
//TODO make sure that is enough to deal with saved state and disabled trees
|
||||
if (gameObject.activeInHierarchy)
|
||||
{
|
||||
StartCoroutine(SetInstantTreeSizeCoroutine(animationValue, animationName, animLayer));
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(SetAnimationTreeCoroutine(animationValue, animationName, animLayer));
|
||||
if (instant)
|
||||
{
|
||||
StartCoroutine(SetInstantTreeSizeCoroutine(animationValue, animationName, animLayer));
|
||||
}
|
||||
else
|
||||
{
|
||||
StartCoroutine(SetAnimationTreeCoroutine(animationValue, animationName, animLayer));
|
||||
}
|
||||
}
|
||||
onStateChanged?.Invoke(currentTreeState);
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Beyond
|
||||
{
|
||||
_reEnable = true;
|
||||
events.onEnable?.Invoke();
|
||||
Debug.Log("ColliderEventTrigger OnEnable");
|
||||
//Debug.Log("ColliderEventTrigger OnEnable");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace Beyond
|
||||
{
|
||||
return;
|
||||
}
|
||||
Debug.Log("On Unequiped weapon in area: "+area.name+" weapon: "+weapon.name);
|
||||
//Debug.Log("On Unequiped weapon in area: "+area.name+" weapon: "+weapon.name);
|
||||
//if current button type is gemstone, check if button should be active
|
||||
m_currentWeapon = area.currentEquippedItem;
|
||||
m_weaponPowerAttribute = m_currentWeapon.GetItemAttribute(bItemAttributes.Power);
|
||||
@@ -76,7 +76,7 @@ namespace Beyond
|
||||
{
|
||||
return;
|
||||
}
|
||||
Debug.Log("On Unequiped weapon in area: "+area.name+" weapon: "+weapon.name);
|
||||
//Debug.Log("On Unequiped weapon in area: "+area.name+" weapon: "+weapon.name);
|
||||
if (m_currentWeaponGemable && weapon.GetItemAttribute(bItemAttributes.Power) !=null)
|
||||
{
|
||||
m_currentWeaponGemable = false;
|
||||
|
||||
@@ -27,7 +27,7 @@ public class UIImageFader : MonoBehaviour
|
||||
// Method to start the fade process
|
||||
public void StartFade()
|
||||
{
|
||||
if (!isFading)
|
||||
if (!isFading && gameObject.activeInHierarchy && enabled)
|
||||
{
|
||||
StartCoroutine(FadeRoutine());
|
||||
}
|
||||
|
||||
@@ -5,8 +5,9 @@ using UnityEngine;
|
||||
|
||||
namespace Beyond
|
||||
{
|
||||
|
||||
[InitializeOnLoad]
|
||||
public class DebugLoggerInitializer
|
||||
public class DebugLoggerInitializer : MonoBehaviour
|
||||
{
|
||||
/*
|
||||
static DebugLoggerInitializer()
|
||||
|
||||
@@ -32,7 +32,16 @@ namespace Beyond
|
||||
component = g.GetComponentInChildren<T>();
|
||||
return component;
|
||||
}
|
||||
*/
|
||||
*/
|
||||
public static void SetActiveUpHierarchy(this GameObject g, bool active)
|
||||
{
|
||||
g.SetActive(active);
|
||||
if (g.transform.parent)
|
||||
{
|
||||
SetActiveUpHierarchy(g.transform.parent.gameObject, active);
|
||||
}
|
||||
}
|
||||
|
||||
public static T FindComponentDownHierarchy<T>(this GameObject g) where T : Component
|
||||
{
|
||||
T component;
|
||||
|
||||
@@ -41,7 +41,7 @@ namespace Beyond
|
||||
public bool m_dontEnableUI = false;
|
||||
|
||||
private static VideoCutsceneController s_instance;
|
||||
private static bool m_wasLoaded = false;
|
||||
//private static bool m_wasLoaded = false;
|
||||
private const string RESOURCE_PATH = "Prefabs/VideoCutsceneCanvas Variant";
|
||||
|
||||
public static VideoCutsceneController Instance
|
||||
@@ -65,7 +65,7 @@ namespace Beyond
|
||||
var resource = Resources.Load<GameObject>(RESOURCE_PATH);
|
||||
if (resource)
|
||||
{
|
||||
m_wasLoaded = true;
|
||||
//m_wasLoaded = true;
|
||||
var gameobject = Instantiate<GameObject>(resource);
|
||||
if (gameobject)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user