Question by
Thiago87 · Sep 29, 2015 at 09:06 AM ·
switchingswitch charactersswitch camerasswitch objects
I am creating a platform 2d game, this game has two main characters (playable), I want to switch the character during the game.
example: one of the characters can not spend a obstacle, the other can, then I switch the character to be able to pass this obstacle. thank you
Comment
Answer by hexagonius · Sep 29, 2015 at 12:18 PM
Run the Movement code in a separate script REFERENCING the current Player. Swap him out on the button press for changing the player.
Answer by Thiago87 · Sep 29, 2015 at 06:31 PM
sorry, I'm new to unity, I could make an example script
Your answer
Follow this Question
Related Questions
switch through switch cases forward and backward with pressing two buttons 0 Answers
Switch objects on click 0 Answers
switch statement issue, any help? 0 Answers
Why Wont my Scene Switch? 2 Answers
Store and access weapons from list C# 0 Answers