Quest Update

This commit is contained in:
Nim-XD
2025-01-06 19:41:29 +05:30
parent 7ea988ddeb
commit e2a6825288
382 changed files with 842991 additions and 846050 deletions

View File

@@ -1,25 +1,25 @@
using System.Collections;
using System.Collections.Generic;
using Assets.HeroEditor4D.Common.Scripts.CharacterScripts;
using UnityEngine;
public class ChangeCharacterOnSelection : MonoBehaviour
{
public Character4D character;
void Start(){
CharacterSelection.OnCharacterChanged += RefreshCharacter;
RefreshCharacter();
}
void OnDestroy()
{
CharacterSelection.OnCharacterChanged -= RefreshCharacter;
}
void RefreshCharacter(){
if(CharacterSelection.selectedCharJson == null){return;}
if(CharacterSelection.selectedCharJson.Length <= 0){return;}
character.FromJson(CharacterSelection.selectedCharJson, true);
}
}
using System.Collections;
using System.Collections.Generic;
using Assets.HeroEditor4D.Common.Scripts.CharacterScripts;
using UnityEngine;
public class ChangeCharacterOnSelection : MonoBehaviour
{
public Character4D character;
void Start(){
CharacterSelection.OnCharacterChanged += RefreshCharacter;
RefreshCharacter();
}
void OnDestroy()
{
CharacterSelection.OnCharacterChanged -= RefreshCharacter;
}
void RefreshCharacter(){
if(CharacterSelection.selectedCharJson == null){return;}
if(CharacterSelection.selectedCharJson.Length <= 0){return;}
character.FromJson(CharacterSelection.selectedCharJson, true);
}
}