Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
seedling
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tommé Nöll
seedling
Commits
41bb5f5d
Commit
41bb5f5d
authored
Oct 06, 2019
by
Tommé Nöll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed door starting open
parent
ebd5de26
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
2 deletions
+8
-2
Assets/Prefabs/Interactibles/Door.prefab
Assets/Prefabs/Interactibles/Door.prefab
+1
-1
Assets/Prefabs/Interactibles/Switch.prefab
Assets/Prefabs/Interactibles/Switch.prefab
+1
-1
Assets/Scripts/SwitchTarget.cs
Assets/Scripts/SwitchTarget.cs
+6
-0
No files found.
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
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