add some extra assets FX and SFX
This commit is contained in:
@@ -155,6 +155,12 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
public UnityEvent eventOnOpenMenu;
|
||||
public UnityEvent eventOnCloseMenu;
|
||||
|
||||
[Space]
|
||||
[Space]
|
||||
|
||||
public UnityEvent eventToSetNextCharacterModel;
|
||||
public UnityEvent eventToSetPreviousCharacterModel;
|
||||
|
||||
[Space]
|
||||
[Header ("Components")]
|
||||
[Space]
|
||||
@@ -189,6 +195,7 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
|
||||
public health mainHealth;
|
||||
|
||||
|
||||
Coroutine menuCoroutine;
|
||||
|
||||
Transform originalCameraParent;
|
||||
@@ -201,6 +208,7 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
|
||||
bool previousKeepAllCharacterMeshesDisabledActiveValue;
|
||||
|
||||
|
||||
void Start ()
|
||||
{
|
||||
if (!characterCustomizationEnabled) {
|
||||
@@ -222,14 +230,21 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
}
|
||||
|
||||
if (setInitialArmorClothPieceList) {
|
||||
StartCoroutine (setInitialArmorClothListCoroutine ());
|
||||
checkSetInitialArmorClothList ();
|
||||
}
|
||||
|
||||
if (keepAllCharacterMeshesDisabledActive && mainInventoryManager.isFirstPersonActive ()) {
|
||||
if (keepAllCharacterMeshesDisabledActive && useInventoryManager && mainInventoryManager.isFirstPersonActive ()) {
|
||||
StartCoroutine (setInitialVisibleMeshesOnCharacter (true));
|
||||
}
|
||||
}
|
||||
|
||||
public void checkSetInitialArmorClothList ()
|
||||
{
|
||||
if (setInitialArmorClothPieceList) {
|
||||
StartCoroutine (setInitialArmorClothListCoroutine ());
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator setInitialArmorClothListCoroutine ()
|
||||
{
|
||||
yield return new WaitForSeconds (0.01f);
|
||||
@@ -297,6 +312,8 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
mainCharacterAspectCustomizationUISystem = currentIngameMenuPanel.GetComponent<characterAspectCustomizationUISystem> ();
|
||||
|
||||
mainCharacterAspectCustomizationUISystemAssigned = true;
|
||||
|
||||
mainCharacterAspectCustomizationUISystem.setMainInventoryCharacterCustomizationSystem (this);
|
||||
}
|
||||
|
||||
if (mainCharacterCustomizationManager == null) {
|
||||
@@ -330,6 +347,13 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void setMultipleCharacterCustomizationTypeButtonInfoByName (string characterName)
|
||||
{
|
||||
if (mainCharacterAspectCustomizationUISystemAssigned) {
|
||||
mainCharacterAspectCustomizationUISystem.setMultipleCharacterCustomizationTypeButtonInfoByName (characterName);
|
||||
}
|
||||
}
|
||||
|
||||
public void openOrCloseCustomizationMenu (bool state)
|
||||
{
|
||||
if (menuOpened == state) {
|
||||
@@ -468,9 +492,15 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
checkAssignCharacterAspectCustomizationUISystem ();
|
||||
}
|
||||
|
||||
bool initializingInventory = false;
|
||||
|
||||
if (useInventoryManager) {
|
||||
initializingInventory = mainInventoryManager.isInitializingInventory ();
|
||||
}
|
||||
|
||||
if (showDebugPrint) {
|
||||
if (useInventoryManager) {
|
||||
print ("initializingInventory ------------------------------------------ " + mainInventoryManager.initializingInventory);
|
||||
print ("initializingInventory ------------------------------------------ " + initializingInventory);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -570,6 +600,52 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void unequipAllCurrentArmorCloth ()
|
||||
{
|
||||
if (!characterCustomizationEnabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mainCharacterCustomizationManagerAssigned) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (showDebugPrint) {
|
||||
print ("unequipAllCurrentArmorCloth");
|
||||
}
|
||||
|
||||
List<string> temporalCurrentPiecesList = new List<string> (currentPiecesList);
|
||||
|
||||
int currentPiecesListCount = currentPiecesList.Count;
|
||||
|
||||
if (currentPiecesListCount == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < currentPiecesListCount; i++) {
|
||||
string categoryName = "";
|
||||
|
||||
if (useInventoryManager) {
|
||||
categoryName = mainCharacterAspectCustomizationUISystem.getArmorClothCategoryByName (temporalCurrentPiecesList [i]);
|
||||
} else {
|
||||
if (mainCharacterCustomizationManagerAssigned) {
|
||||
categoryName = mainCharacterCustomizationManager.getArmorClothCategoryByName (temporalCurrentPiecesList [i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (showDebugPrint) {
|
||||
print ("removing armor cloth part" + temporalCurrentPiecesList [i] + " " + categoryName);
|
||||
}
|
||||
|
||||
if (categoryName != "") {
|
||||
if (useInventoryManager) {
|
||||
mainInventoryManager.setCurrentInventoryObjectAndUnequipByName (temporalCurrentPiecesList [i]);
|
||||
} else {
|
||||
unequipObject (temporalCurrentPiecesList [i], categoryName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void checkArmorClothPieceToUse (string objectName, bool state)
|
||||
{
|
||||
@@ -682,6 +758,31 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
mainFullArmorClothTemplateData = newFullArmorClothTemplateData;
|
||||
}
|
||||
|
||||
public void setInitialArmorClothPieceListState (bool state)
|
||||
{
|
||||
setInitialArmorClothPieceList = state;
|
||||
}
|
||||
|
||||
public void setUseCharacterAspectCustomizationTemplateState (bool state)
|
||||
{
|
||||
useCharacterAspectCustomizationTemplate = state;
|
||||
}
|
||||
|
||||
public void setUseRandomCharacterAspectCustomizationTemplateState (bool state)
|
||||
{
|
||||
useRandomCharacterAspectCustomizationTemplate = state;
|
||||
}
|
||||
|
||||
public void setCharacterAspectCustomizationTemplateList (List<characterAspectCustomizationTemplate> newList)
|
||||
{
|
||||
characterAspectCustomizationTemplateList = newList;
|
||||
}
|
||||
|
||||
public void setInitialCharacterAspectCustomizationTemplate (characterAspectCustomizationTemplate newCharacterAspectCustomizationTemplate)
|
||||
{
|
||||
initialCharacterAspectCustomizationTemplate = newCharacterAspectCustomizationTemplate;
|
||||
}
|
||||
|
||||
void configureStats (bool state, List<armorClothStatsInfo> armorClothStatsInfoList, string objectName, bool isFullSetActive)
|
||||
{
|
||||
if (showDebugPrint) {
|
||||
@@ -692,6 +793,23 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
|
||||
bool isLoadingGame = mainPlayerStatsSystem.isLoadingGameState ();
|
||||
|
||||
bool initializingInventory = false;
|
||||
|
||||
if (useInventoryManager) {
|
||||
initializingInventory = mainInventoryManager.isInitializingInventory ();
|
||||
}
|
||||
|
||||
if (!initializingInventory) {
|
||||
|
||||
if (showDebugPrint) {
|
||||
print ("the inventory was already initialized, so updating the loading state on the player stats system");
|
||||
}
|
||||
|
||||
mainPlayerStatsSystem.setIsLoadingGameState (false);
|
||||
|
||||
isLoadingGame = false;
|
||||
}
|
||||
|
||||
for (int k = 0; k < armorClothStatsInfoListCount; k++) {
|
||||
armorClothStatsInfo currentArmorClothStatsInfo = armorClothStatsInfoList [k];
|
||||
|
||||
@@ -744,7 +862,7 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
}
|
||||
|
||||
if (showDebugPrint) {
|
||||
print (currentArmorClothStatsInfo.Name + " " + extraValue + " " + objectName + " " + isFullSetActive);
|
||||
print (currentArmorClothStatsInfo.Name + " " + extraValue + " " + objectName + " " + isFullSetActive + " " + isLoadingGame);
|
||||
}
|
||||
|
||||
if (!isLoadingGame) {
|
||||
@@ -1248,6 +1366,43 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
return null;
|
||||
}
|
||||
|
||||
public characterCustomizationManager getCharacterCustomizationManager ()
|
||||
{
|
||||
return mainCharacterCustomizationManager;
|
||||
}
|
||||
|
||||
public void updateCharacterTransform ()
|
||||
{
|
||||
if (mainCharacterCustomizationManager != null) {
|
||||
mainCharacterCustomizationManager.setCharacterTransform (playerTransform);
|
||||
}
|
||||
}
|
||||
|
||||
public void setNewCharacterModel (GameObject newObject)
|
||||
{
|
||||
if (mainCharacterAspectCustomizationUISystemAssigned) {
|
||||
mainCharacterAspectCustomizationUISystem.setNewCharacterModel (newObject);
|
||||
}
|
||||
}
|
||||
|
||||
public void updateCheckAssignCharacterAspectCustomizationUISystem ()
|
||||
{
|
||||
if (characterCustomizationEnabled) {
|
||||
if (!mainCharacterAspectCustomizationUISystemAssigned) {
|
||||
checkAssignCharacterAspectCustomizationUISystem ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setNextOrPreviousCharacterModel (bool state)
|
||||
{
|
||||
if (state) {
|
||||
eventToSetNextCharacterModel.Invoke ();
|
||||
} else {
|
||||
eventToSetPreviousCharacterModel.Invoke ();
|
||||
}
|
||||
}
|
||||
|
||||
public void renameArmorClothObjectByName (string currentObjectName, string newObjectName)
|
||||
{
|
||||
bool objectsFound = false;
|
||||
@@ -1310,6 +1465,13 @@ public class inventoryCharacterCustomizationSystem : MonoBehaviour
|
||||
}
|
||||
|
||||
//EDITOR FUNCTIONS
|
||||
public void setNewCharacterCustomizationManager (characterCustomizationManager newCharacterCustomizationManager)
|
||||
{
|
||||
mainCharacterCustomizationManager = newCharacterCustomizationManager;
|
||||
|
||||
updateComponent ();
|
||||
}
|
||||
|
||||
public void setKeepAllCharacterMeshesDisabledActiveStateOnEditor (bool state)
|
||||
{
|
||||
keepAllCharacterMeshesDisabledActive = state;
|
||||
|
||||
Reference in New Issue
Block a user