≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Changing texture with mouse clicks
Posted by:
(you are not logged in)
Enter the missing letter in: "Int?rnational"
(you are not logged in)
Text:
[quote][b][/b] wrote: there can be many ways of doing this. The simplest and easy one is to unregister your frameevent. [code]ccbUnregisterOnFrameEvent(func) [/code] you can use this command to unregister your previous function ( you can assign different names to your textures function and can then register and unregister them. you can also use variables within your frameevent functions with if and else statements. if you don't want to unregister frame events. for example [code] var texture = ccbGetCopperCubeVariable("Texture"); if (texture == "glove") { ccbDrawTextureRectangleWithAlpha("glove.png", mouseX-100, mouseY-100, mouseX+100, mouseY+100); } else if (texture == "hand") { ccbDrawTextureRectangleWithAlpha("hand.png", mouseX-100, mouseY-100, mouseX+100, mouseY+100); } [/code] you can use something like that, am not sure but this should work if you are planning to use this method then you need to set the variable on when a key is pressed do something, set or change a variable, in the above example I've used "Texture" as the variable name you can whatever you want. then can provide it a value like ( glove or hand ) or something else accordingly. hope this helps. *holy**holy*[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact