Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
another world in jucheland
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
nippon culture research center
another world in jucheland
Commits
b940901b
Commit
b940901b
authored
Jan 16, 2019
by
18김민수
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Critical event bug fix
parent
0d55d9e2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
43 deletions
+94
-43
EventLoader.cs
ISEKAI/Assets/ISEKAI_VIEW/EventLoader.cs
+2
-2
EventManager.cs
ISEKAI/Assets/ISEKAI_VIEW/EventManager.cs
+76
-23
GameManager.cs
ISEKAI/Assets/ISEKAI_VIEW/GameManager.cs
+1
-1
UIEventManager.cs
ISEKAI/Assets/ISEKAI_VIEW/UIEventManager.cs
+3
-12
EventScene.unity
ISEKAI/Assets/Scenes/EventScene.unity
+12
-5
No files found.
ISEKAI/Assets/ISEKAI_VIEW/EventLoader.cs
View file @
b940901b
...
...
@@ -28,11 +28,11 @@ public class EventLoader : MonoBehaviour // This script is attatched to event SD
{
EventCore
eventCore
=
UITownManager
.
instance
.
GetEventCoreFromEventSd
(
gameObject
.
transform
);
SceneManager
.
LoadScene
(
"EventScene"
,
LoadSceneMode
.
Single
);
GameManager
.
instance
.
currentEvent
Name
=
eventCore
.
eventNam
e
;
GameManager
.
instance
.
currentEvent
=
eventCor
e
;
}
public
void
LoadEventScene
(
EventCore
eventCore
)
{
SceneManager
.
LoadScene
(
"EventScene"
,
LoadSceneMode
.
Single
);
GameManager
.
instance
.
currentEvent
Name
=
eventCore
.
eventNam
e
;
GameManager
.
instance
.
currentEvent
=
eventCor
e
;
}
}
ISEKAI/Assets/ISEKAI_VIEW/EventManager.cs
View file @
b940901b
...
...
@@ -14,16 +14,24 @@ public class EventManager : MonoBehaviour
public
GameObject
spritePeopleCenter
;
public
GameObject
sprtiePeopleRight
;
public
Image
test
;
public
GameObject
[]
spritePeople
;
// use same location index from SpriteLocation
public
Text
textCharacterInfo
;
public
Text
textScript
;
public
Text
textFullScript
;
void
Start
()
{
SetUpEventManager
();
}
public
EventManager
(
EventCore
eventCore
)
// when playing new event, this instance should be made.
public
void
SetUpEventManager
(
)
// when playing new event, this instance should be made.
{
this
.
eventCore
=
eventCore
;
scriptEnumerator
=
eventCore
.
script
.
GetEnumerator
();
eventCore
=
GameManager
.
instance
.
currentEvent
;
scriptEnumerator
=
GameManager
.
instance
.
currentEvent
.
script
.
GetEnumerator
();
}
public
EventCore
eventCore
{
get
;
private
set
;
}
// when event SD is clicked and scene changed, it should be set to that event.
...
...
@@ -32,7 +40,6 @@ public class EventManager : MonoBehaviour
public
void
ExecuteOneScript
()
{
Debug
.
Log
(
"asdf"
);
// TODO:
// when MoveNext() returns false, it must go back to TownScene.
scriptEnumerator
.
MoveNext
();
...
...
@@ -104,90 +111,117 @@ public class EventManager : MonoBehaviour
}
}
private
void
_enableContainerConversation
(
bool
i
)
{
GameObject
contianerTest
=
GameObject
.
Find
(
"Canvas/ContainerConversation/ContainerCharacterInfo/BackgroundCharacterInfo"
);
Image
testImage
=
contianerTest
.
GetComponent
<
Image
>();
if
(
i
==
true
)
{
testImage
.
enabled
=
false
;
}
}
private
void
_Explanation
(
Explanation
explanation
)
{
containerChoice
.
SetActive
(
false
);
containerConversation
.
SetActive
(
false
);
containerFullScript
.
SetActive
(
true
);
Debug
.
Log
(
"explanation"
);
//if(GameObject.Find("Canvas/ContainerConversation") == null)
//{
// Debug.Log("안찾아짐");
//}
//_enableContainerConversation(true);
//containerChoice.SetActive(false);
//containerConversation.SetActive(false);
//containerFullScript.SetActive(true);
}
private
void
_Conversation
(
Conversation
conversation
)
{
Debug
.
Log
(
"conversation"
);
containerChoice
.
SetActive
(
false
);
containerConversation
.
SetActive
(
true
);
containerFullScript
.
SetActive
(
false
);
textCharacterInfo
.
text
=
conversation
.
characterName
;
textScript
.
text
=
conversation
.
contents
;
if
(
conversation
.
brightCharacter
!=
SpriteLocation
.
None
)
spritePeople
[(
int
)
conversation
.
brightCharacter
].
SetActive
(
true
);
_setBright
(
conversation
.
brightCharacter
);
}
private
void
_LoadCharacter
(
LoadCharacter
loadCharacter
)
{
Debug
.
Log
(
"LoadCharacter"
);
}
private
void
_UnloadCharacter
(
UnloadCharacter
unloadCharacter
)
{
Debug
.
Log
(
"UnloadCharacter"
);
}
private
void
_LoadBackground
(
LoadBackground
loadBackground
)
{
Debug
.
Log
(
"LoadBackground"
);
}
private
void
_PlayMusic
(
PlayMusic
playMusic
)
{
Debug
.
Log
(
"PlayMusic"
);
}
private
void
_StopMusic
(
StopMusic
stopMusic
)
{
Debug
.
Log
(
"StopMusic"
);
}
private
void
_LoadCG
(
LoadCG
loadCG
)
{
Debug
.
Log
(
"LoadCG"
);
}
private
void
_UnloadCG
(
UnloadCG
unloadCG
)
{
Debug
.
Log
(
"UnloadCG"
);
}
private
void
_VFXCamerashake
(
VFXCameraShake
vfxCameraShake
)
{
Debug
.
Log
(
"VFXCamerashake"
);
}
private
void
_VFXLoadSprite
(
VFXLoadSprite
vfxLoadSprite
)
{
Debug
.
Log
(
"VFXLoadSprite"
);
}
private
void
_VFXUnloadSprite
(
VFXUnloadSprite
vfxUnloadSprite
)
{
Debug
.
Log
(
"VFXUnloadSprite"
);
}
private
void
_VFXSound
(
VFXSound
vfxSound
)
{
Debug
.
Log
(
"VFXSoun"
);
}
private
void
_LoadMinigame
(
LoadMinigame
loadMinigame
)
{
Debug
.
Log
(
"LoadMinigame"
);
}
private
void
_LoadVideo
(
LoadVideo
loadVideo
)
{
Debug
.
Log
(
"LoadVideo"
);
}
private
void
_Choice
(
Choice
choice
)
{
Debug
.
Log
(
"Choice"
);
containerChoice
.
SetActive
(
true
);
containerConversation
.
SetActive
(
false
);
containerFullScript
.
SetActive
(
false
);
...
...
@@ -195,11 +229,30 @@ public class EventManager : MonoBehaviour
private
void
_VFXTransition
(
VFXTransition
vfxTransition
)
{
Debug
.
Log
(
"VFXTransition"
);
}
private
void
_VFXPause
(
VFXPause
vfxPause
)
{
Debug
.
Log
(
"VFXPause"
);
}
private
void
_setBright
(
SpriteLocation
location
)
{
SpriteRenderer
temp
;
int
bright
=
(
int
)
location
;
for
(
int
i
=
1
;
i
<
4
;
i
++)
{
temp
=
spritePeople
[
i
].
GetComponent
<
SpriteRenderer
>();
if
(
i
==
bright
)
{
temp
.
color
=
new
Color
(
255f
,
255f
,
255f
,
255f
);
continue
;
}
temp
.
color
=
new
Color
(
97f
,
97f
,
97f
,
255f
);
}
}
}
ISEKAI/Assets/ISEKAI_VIEW/GameManager.cs
View file @
b940901b
...
...
@@ -8,7 +8,7 @@ using System.Linq;
public
class
GameManager
:
MonoBehaviour
{
public
static
GameManager
instance
;
public
string
currentEventName
;
public
EventCore
currentEvent
;
void
Awake
()
{
if
(
instance
==
null
)
...
...
ISEKAI/Assets/ISEKAI_VIEW/UIEventManager.cs
View file @
b940901b
...
...
@@ -19,19 +19,10 @@ public class UIEventManager : MonoBehaviour
public
Button
buttonAuto
;
public
Button
buttonNext
;
p
rivate
EventManager
_
eventManager
;
p
ublic
EventManager
eventManager
;
void
OnEnable
()
void
Start
()
{
SceneManager
.
sceneLoaded
+=
_InitEventManager
;
}
private
void
_InitEventManager
(
Scene
s
,
LoadSceneMode
m
)
{
Game
game
=
GameManager
.
instance
.
game
;
var
eventList
=
game
.
allEventsList
;
_eventManager
=
new
EventManager
(
eventList
.
Find
(
e
=>
e
.
eventName
.
Equals
(
GameManager
.
instance
.
currentEventName
)));
containerChoice
.
SetActive
(
false
);
containerConversation
.
SetActive
(
false
);
containerFullScript
.
SetActive
(
false
);
...
...
@@ -53,6 +44,6 @@ public class UIEventManager : MonoBehaviour
public
void
OnClickNextButton
()
{
_
eventManager
.
ExecuteOneScript
();
eventManager
.
ExecuteOneScript
();
}
}
ISEKAI/Assets/Scenes/EventScene.unity
View file @
b940901b
...
...
@@ -127,7 +127,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&54311926
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -570,12 +570,12 @@ MonoBehaviour:
m_TypeName
:
UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData
:
m_Font
:
{
fileID
:
1
0102
,
guid
:
0000000000000000e000000000000000
,
type
:
0
}
m_FontSize
:
5
0
m_Font
:
{
fileID
:
1
2800000
,
guid
:
8018e05d598d37e4f8ac6aff9632ccd6
,
type
:
3
}
m_FontSize
:
7
0
m_FontStyle
:
0
m_BestFit
:
0
m_MinSize
:
0
m_MaxSize
:
6
0
m_MaxSize
:
8
0
m_Alignment
:
0
m_AlignByGeometry
:
0
m_RichText
:
1
...
...
@@ -920,7 +920,7 @@ GameObject:
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
m_StaticEditorFlags
:
0
m_IsActive
:
0
m_IsActive
:
1
---
!u!224
&1140836744
RectTransform
:
m_ObjectHideFlags
:
0
...
...
@@ -1822,6 +1822,12 @@ MonoBehaviour:
spritePeopleLeft
:
{
fileID
:
1793098992
}
spritePeopleCenter
:
{
fileID
:
1227607383
}
sprtiePeopleRight
:
{
fileID
:
1419722515
}
test
:
{
fileID
:
517689898
}
spritePeople
:
-
{
fileID
:
0
}
-
{
fileID
:
1793098992
}
-
{
fileID
:
1227607383
}
-
{
fileID
:
1419722515
}
textCharacterInfo
:
{
fileID
:
623449835
}
textScript
:
{
fileID
:
1126384283
}
textFullScript
:
{
fileID
:
902959466
}
...
...
@@ -2186,6 +2192,7 @@ MonoBehaviour:
buttonSkip
:
{
fileID
:
1257526654
}
buttonAuto
:
{
fileID
:
1692013385
}
buttonNext
:
{
fileID
:
165578307
}
eventManager
:
{
fileID
:
1800731943
}
---
!u!1
&1973724594
GameObject
:
m_ObjectHideFlags
:
0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment