snozbot / fungus

An easy to use Unity 3D library for creating illustrated Interactive Fiction games and more.
MIT License
1.59k stars 291 forks source link

Clickable character (New Feature) #980

Closed breadnone closed 3 years ago

breadnone commented 3 years ago

Description

Make character portraits on stage to be interactable (clickable).

What is the current behavior?

There's no easy way to achieve clickable character in Fungus currently as Fungus character portrait system mostly handled on runtime.

What is the new behavior?

User can choose the behavior of their character by assigning block to be executed when click occurs on character portraits. This will give them freedom and space to be more creative with their character.

https://user-images.githubusercontent.com/64100867/121684114-79d29780-cae8-11eb-8a03-f652665f929e.mp4

image

Important Notes

Other information

Tested this on my current project and worked wonders (for my use cases) but needs more further testing. Let me know if you find any bugs so I can fix it. Thanks!

Edit: Added video & screenshot

breadnone commented 3 years ago

I'll make complementary command for this feature so user would be able to change which flowcharts/blocks would be executed. That is if Steve is okay with this PR.

Edit: Also it would be nice if PortraitCanvas' BlockRaycast can be defaulted to true so we don't have to use GetComponent each time

breadnone commented 3 years ago

Something wrong with local git, I'll close this and open new one