Hello
Guest
Home
Help
Search
Login
Register
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Having trouble understanding SetSprite [C#]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Having trouble understanding SetSprite [C#] (Read 5023 times)
bartleycollin
2D Toolkit
Newbie
Posts: 8
Having trouble understanding SetSprite [C#]
«
on:
April 02, 2014, 06:45:50 pm »
I've been trying to figure this out over the past day, with no luck. I've looked at the forum page, but I think I'm missing something. I would highly appreciate some help with this
Logged
unikronsoftware
Administrator
Hero Member
Posts: 9709
Re: Having trouble understanding SetSprite [C#]
«
Reply #1 on:
April 02, 2014, 07:47:12 pm »
Have you seen the scripting reference?
http://2dtoolkit.com/docs/latest/html/annotated.html
If you still can't figure it out, what is it you're trying to do?
Logged
bartleycollin
2D Toolkit
Newbie
Posts: 8
Re: Having trouble understanding SetSprite [C#]
«
Reply #2 on:
April 02, 2014, 08:13:43 pm »
I have seen that, and I'll try again. For now, what I'm trying to do is set up a very simple IF statement that checks if a Bool is true, and if that's the case, switches the object to a specified sprite.
Logged
bartleycollin
2D Toolkit
Newbie
Posts: 8
Re: Having trouble understanding SetSprite [C#]
«
Reply #3 on:
April 02, 2014, 09:09:46 pm »
I've been trying, I still can't figure it out.
All I'm doing is typing code like this in my update function. I know I'm doing something totally wrong, but I can't figure it out..
Code:
[Select]
void Update () {
tk2dBaseSprite.SetSprite(4);
}
}
Logged
bartleycollin
2D Toolkit
Newbie
Posts: 8
Re: Having trouble understanding SetSprite [C#]
«
Reply #4 on:
April 02, 2014, 09:48:01 pm »
Phew.. I finally got it to work.
Logged
Print
Pages: [
1
]
« previous
next »
2D Toolkit Forum
»
2D Toolkit
»
Support
»
Having trouble understanding SetSprite [C#]