-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
보스 처치시 복귀 포탈 생성 구현 feature/munbin/#125
- Loading branch information
Showing
10 changed files
with
347 additions
and
714 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using MBT; | ||
using UnityEngine; | ||
|
||
namespace Monster.Nodes | ||
{ | ||
[AddComponentMenu("")] | ||
[MBTNode(name = "Monster/ReturnMap")] | ||
public class ReturnMap : Leaf | ||
{ | ||
private SpriteRenderer _sprite; | ||
private CapsuleCollider2D _collider; | ||
private bool _created; | ||
|
||
private void Start() | ||
{ | ||
var gameObj = GameObject.FindGameObjectWithTag("RetPortal"); | ||
_sprite = gameObj.GetComponent<SpriteRenderer>(); | ||
_collider = gameObj.GetComponent<CapsuleCollider2D>(); | ||
} | ||
|
||
public override NodeResult Execute() | ||
{ | ||
if (_created) return NodeResult.success; | ||
|
||
_created = true; | ||
_sprite.enabled = true; | ||
_collider.enabled = true; | ||
|
||
return NodeResult.success; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.