Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Tommé Nöll
seedling
Commits
41bb5f5d
Commit
41bb5f5d
authored
Oct 06, 2019
by
Tommé Nöll
Browse files
fixed door starting open
parent
ebd5de26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Assets/Prefabs/Interactibles/Door.prefab
View file @
41bb5f5d
...
...
@@ -14,7 +14,7 @@ GameObject:
-
component
:
{
fileID
:
857212579820544967
}
-
component
:
{
fileID
:
2105881298012768113
}
m_Layer
:
0
m_Name
:
RemovableWall
m_Name
:
Door
m_TagString
:
Untagged
m_Icon
:
{
fileID
:
0
}
m_NavMeshLayer
:
0
...
...
Assets/Prefabs/Interactibles/Switch.prefab
View file @
41bb5f5d
...
...
@@ -108,7 +108,7 @@ BoxCollider2D:
adaptiveTiling
:
0
m_AutoTiling
:
0
serializedVersion
:
2
m_Size
:
{
x
:
0.64
,
y
:
0
.64
}
m_Size
:
{
x
:
2.19
,
y
:
2
.64
}
m_EdgeRadius
:
0
---
!u!114
&299633547317264585
MonoBehaviour
:
...
...
Assets/Scripts/SwitchTarget.cs
View file @
41bb5f5d
...
...
@@ -11,14 +11,20 @@ public class SwitchTarget : MonoBehaviour {
private
Animator
anim
;
private
Collider2D
collider
;
private
bool
init
=
false
;
void
Start
()
{
if
(
toggleAnimationState
)
anim
=
GetComponent
<
Animator
>();
if
(
toggleCollider
)
collider
=
GetComponent
<
Collider2D
>();
init
=
true
;
}
public
void
Switch
(
bool
on
)
{
if
(!
init
)
{
Start
();
}
if
(
invert
)
{
on
=
!
on
;
...
...
Write
Preview
Supports
Markdown
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