add some extra assets FX and SFX
This commit is contained in:
@@ -211,6 +211,12 @@ public class menuPause : MonoBehaviour
|
||||
|
||||
public bool ignoreShowOrHideMouseCursorAndPauseHideCheckOnClickExternally;
|
||||
|
||||
[Space]
|
||||
|
||||
public bool menuOpenedWithActionSystemActive;
|
||||
|
||||
public string menuOpenedWithActionSystemName;
|
||||
|
||||
[Space]
|
||||
[Header ("UI Elements")]
|
||||
[Space]
|
||||
@@ -278,6 +284,9 @@ public class menuPause : MonoBehaviour
|
||||
|
||||
bool externalFadeScreenActive;
|
||||
|
||||
bool allowToExitMenuWithTitleMenuTextButtonActive;
|
||||
|
||||
|
||||
void Awake ()
|
||||
{
|
||||
bool mainGameManagerLocated = mainGameManager != null;
|
||||
@@ -755,44 +764,75 @@ public class menuPause : MonoBehaviour
|
||||
|
||||
public void setIngameMenuOpenedState (string ingameMenuName, bool state, bool activateEvents)
|
||||
{
|
||||
for (int i = 0; i < ingameMenuInfoList.Count; i++) {
|
||||
if (ingameMenuInfoList [i].Name.Equals (ingameMenuName)) {
|
||||
ingameMenuInfoList [i].menuOpened = state;
|
||||
int ingameMenuInfoListCount = ingameMenuInfoList.Count;
|
||||
|
||||
int currentIngameMenuIndex = -1;
|
||||
|
||||
for (int i = 0; i < ingameMenuInfoListCount; i++) {
|
||||
ingameMenuInfo currentIngameMenuInfo = ingameMenuInfoList [i];
|
||||
|
||||
if (currentIngameMenuInfo.Name.Equals (ingameMenuName)) {
|
||||
|
||||
currentIngameMenuIndex = i;
|
||||
|
||||
currentIngameMenuInfo.menuOpened = state;
|
||||
|
||||
// createIngameMenuPanel (i);
|
||||
|
||||
if (activateEvents && ingameMenuInfoList [i].useEventOnOpenClose) {
|
||||
if (activateEvents && currentIngameMenuInfo.useEventOnOpenClose) {
|
||||
|
||||
if (state) {
|
||||
ingameMenuInfoList [i].eventOnOpen.Invoke ();
|
||||
currentIngameMenuInfo.eventOnOpen.Invoke ();
|
||||
} else {
|
||||
ingameMenuInfoList [i].eventOnClose.Invoke ();
|
||||
currentIngameMenuInfo.eventOnClose.Invoke ();
|
||||
}
|
||||
|
||||
checkEventOnOpenCloseInGameMenu (state);
|
||||
}
|
||||
|
||||
fadeInGameMenuPanel (ingameMenuInfoList [i], !state);
|
||||
fadeInGameMenuPanel (currentIngameMenuInfo, !state);
|
||||
|
||||
if (ingameMenuInfoList [i].setCustomTimeScale) {
|
||||
if (currentIngameMenuInfo.setCustomTimeScale) {
|
||||
if (state) {
|
||||
setTimeScale (ingameMenuInfoList [i].customTimeScale);
|
||||
setTimeScale (currentIngameMenuInfo.customTimeScale);
|
||||
} else {
|
||||
setTimeScale (1);
|
||||
}
|
||||
}
|
||||
|
||||
if (ingameMenuInfoList [i].pauseAIWhenOpenMenu) {
|
||||
GKC_Utils.pauseOrResumeAIOnScene (state, ingameMenuInfoList [i].pauseCharacterPriority);
|
||||
if (currentIngameMenuInfo.pauseAIWhenOpenMenu) {
|
||||
GKC_Utils.pauseOrResumeAIOnScene (state, currentIngameMenuInfo.pauseCharacterPriority);
|
||||
}
|
||||
|
||||
if (ingameMenuInfoList [i].setNewMouseCursorControllerSpeed) {
|
||||
if (currentIngameMenuInfo.setNewMouseCursorControllerSpeed) {
|
||||
if (state) {
|
||||
setMouseCursorControllerSpeedOnGameValue (ingameMenuInfoList [i].newMouseCursroControllerSpeed);
|
||||
setMouseCursorControllerSpeedOnGameValue (currentIngameMenuInfo.newMouseCursroControllerSpeed);
|
||||
} else {
|
||||
setOriginalMouseCursorControllerSpeedOnGameValue ();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (currentIngameMenuInfo.mainIngameMenuPanelAssigned) {
|
||||
currentIngameMenuInfo.mainIngameMenuPanel.checkMenuIfNotCurrentOpened ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (state) {
|
||||
if (currentIngameMenuIndex > -1) {
|
||||
ingameMenuInfo currentIngameMenuInfo = ingameMenuInfoList [currentIngameMenuIndex];
|
||||
|
||||
if (currentIngameMenuInfo.mainIngameMenuPanelAssigned) {
|
||||
currentIngameMenuInfo.mainIngameMenuPanel.checkMenuIfCurrentOpened ();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for (int i = 0; i < ingameMenuInfoListCount; i++) {
|
||||
ingameMenuInfo currentIngameMenuInfo = ingameMenuInfoList [i];
|
||||
|
||||
if (currentIngameMenuInfo.mainIngameMenuPanelAssigned) {
|
||||
currentIngameMenuInfo.mainIngameMenuPanel.checkAllMenusClosed ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -801,6 +841,7 @@ public class menuPause : MonoBehaviour
|
||||
for (int i = 0; i < playerMenuInfoListCount; i++) {
|
||||
if (playerMenuInfoList [i].Name.Equals (ingameMenuName)) {
|
||||
currentPlayerMenuInfoIndex = i;
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1366,6 +1407,22 @@ public class menuPause : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void setMenuOpenedWithActionSystemState (bool state, string menuName)
|
||||
{
|
||||
menuOpenedWithActionSystemActive = state;
|
||||
|
||||
menuOpenedWithActionSystemName = menuName;
|
||||
}
|
||||
|
||||
public void checkCloseMenuOpenedByActionSystem ()
|
||||
{
|
||||
if (playerMenuActive && menuOpenedWithActionSystemActive) {
|
||||
if (playerControllerManager.isActionActive ()) {
|
||||
playerControllerManager.playCurrentAnimationOnPlayerActionSystem ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bool ignoreDeathStateOnMenuPauseState;
|
||||
|
||||
public void setIgnoreDeathStateOnMenuPauseState (bool state)
|
||||
@@ -2020,6 +2077,16 @@ public class menuPause : MonoBehaviour
|
||||
public void closePlayerMenuByName (string menuName)
|
||||
{
|
||||
if (openOrClosePlayerOpenMenuByNamePaused) {
|
||||
if (menuOpenedWithActionSystemActive && menuOpenedWithActionSystemName.Equals (menuName)) {
|
||||
checkCloseMenuOpenedByActionSystem ();
|
||||
}
|
||||
|
||||
if (allowToExitMenuWithTitleMenuTextButtonActive) {
|
||||
if (openMenuSystemAssigned) {
|
||||
currentOpenMenuSystem.closeMenu ();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2195,6 +2262,11 @@ public class menuPause : MonoBehaviour
|
||||
return openOrClosePlayerOpenMenuByNamePaused;
|
||||
}
|
||||
|
||||
public void setAllowToExitMenuWithTitleMenuTextButtonActiveState (bool state)
|
||||
{
|
||||
allowToExitMenuWithTitleMenuTextButtonActive = state;
|
||||
}
|
||||
|
||||
public void setChangeBetweenIngameMenuPausedState (bool state)
|
||||
{
|
||||
changeBetweenIngameMenuPaused = state;
|
||||
@@ -2322,6 +2394,11 @@ public class menuPause : MonoBehaviour
|
||||
return mainGameManager.isLoadGameEnabled ();
|
||||
}
|
||||
|
||||
public bool isPlayerMenuActive ()
|
||||
{
|
||||
return playerMenuActive;
|
||||
}
|
||||
|
||||
public void saveGameInfoFromEditor (string saveInfoName)
|
||||
{
|
||||
mainGameManager.saveGameInfoFromEditor (saveInfoName);
|
||||
|
||||
Reference in New Issue
Block a user