Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
tetra-tower
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Oenos
tetra-tower
Commits
94858f5a
Commit
94858f5a
authored
Feb 25, 2019
by
16도재형
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
보스 및 보스방 하는 중, enemy 풀받아서 상속할생각
parent
926ba458
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
157 additions
and
1 deletion
+157
-1
Boss.cs
Assets/Scripts/Characters/Enemy/Boss.cs
+6
-0
Boss.meta
Assets/Scripts/Characters/Enemy/Boss.meta
+8
-0
BossRoom.meta
Assets/Scripts/TetrisMap/Rooms/BossRoom.meta
+8
-0
JiJooRoom.cs
Assets/Scripts/TetrisMap/Rooms/BossRoom/JiJooRoom.cs
+42
-0
JiJooRoom.cs.meta
Assets/Scripts/TetrisMap/Rooms/BossRoom/JiJooRoom.cs.meta
+11
-0
BossRoomInGame.cs
Assets/Scripts/TetrisMap/Rooms/BossRoomInGame.cs
+82
-1
No files found.
Assets/Scripts/Characters/Enemy/Boss.cs
View file @
94858f5a
...
...
@@ -3,6 +3,12 @@ using System.Collections.Generic;
using
UnityEngine
;
public
class
Boss
:
MonoBehaviour
{
public
BossRoomInGame
bossRoom
;
protected
virtual
void
Awake
()
{
;
}
// Use this for initialization
void
Start
()
{
...
...
Assets/Scripts/Characters/Enemy/Boss.meta
0 → 100644
View file @
94858f5a
fileFormatVersion: 2
guid: 4c4bf7e2f72d3664bbe31de39b9cf256
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/TetrisMap/Rooms/BossRoom.meta
0 → 100644
View file @
94858f5a
fileFormatVersion: 2
guid: de02c07fa96ee9a4db10a2e3e1f5815a
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/TetrisMap/Rooms/BossRoom/JiJooRoom.cs
0 → 100644
View file @
94858f5a
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
JiJooRoom
:
BossRoomInGame
{
protected
override
void
Awake
()
{
base
.
Awake
();
}
// Use this for initialization
protected
override
void
Start
()
{
base
.
Start
();
transitionAction
[
0
]
+=
Phase0Transition
;
transitionAction
[
1
]
+=
Phase1Transition
;
}
// Update is called once per frame
protected
override
void
Update
()
{
base
.
Update
();
}
protected
void
Phase0Transition
()
{
}
protected
void
Phase1Transition
()
{
}
protected
void
Phase1
()
{
}
protected
void
Phase2
()
{
}
}
Assets/Scripts/TetrisMap/Rooms/BossRoom/JiJooRoom.cs.meta
0 → 100644
View file @
94858f5a
fileFormatVersion: 2
guid: f0bea638eed7b944780becb205ba4e03
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Assets/Scripts/TetrisMap/Rooms/BossRoomInGame.cs
View file @
94858f5a
using
System.Collections
;
using
System
;
using
System.Collections
;
using
System.Collections.Generic
;
using
UnityEngine
;
public
class
BossRoomInGame
:
RoomInGame
{
public
Boss
[]
bosses
;
public
int
totalPhase
;
private
int
curPhase
=
-
1
;
public
int
CurPhase
{
get
{
return
curPhase
;
}
set
{
// 모든 페이즈가 끝났을때
if
(
value
>
totalPhase
)
{
curPhase
=
-
1
;
RoomClear
();
}
// 페이즈 이동
else
if
(
value
!=
curPhase
)
{
if
(
phaseCoroutine
!=
null
)
StopCoroutine
(
phaseCoroutine
);
curPhase
=
value
;
phaseCoroutine
=
Phase
(
curPhase
);
StartCoroutine
(
phaseCoroutine
);
}
}
}
public
bool
isTransitionFinished
;
// phaseAction 전(isTransitionFinished == false 일때) 매 프레임 호출됨; Update 대응
public
Action
[]
transitionAction
;
// 진행중인 phase coroutine에서 매 프레임 호출됨; Update 대용
public
Action
[]
phaseAction
;
// 현재 진행중인 phase coroutine
private
IEnumerator
phaseCoroutine
;
protected
bool
attackStart
;
protected
virtual
void
Awake
()
{
transitionAction
=
new
Action
[
totalPhase
];
phaseAction
=
new
Action
[
totalPhase
];
}
// Use this for initialization
protected
virtual
void
Start
()
{
}
// Update is called once per frame
protected
virtual
void
Update
()
{
if
(
attackStart
)
{
StartCoroutine
(
BeforeBossFight
());
attackStart
=
false
;
}
}
protected
virtual
IEnumerator
BeforeBossFight
()
{
CurPhase
++;
yield
return
null
;
}
protected
virtual
IEnumerator
AfterBossFight
()
{
yield
return
null
;
}
IEnumerator
Phase
(
int
phase
)
{
isTransitionFinished
=
false
;
while
(!
isTransitionFinished
)
{
transitionAction
[
phase
]();
yield
return
null
;
}
while
(
CurPhase
==
phase
)
{
phaseAction
[
phase
]();
yield
return
null
;
}
}
public
override
void
RoomEnter
()
{
...
...
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