Drawing without using Stencyl.graphics.G (Stencyl 4.0)

Introduction 
Stencyl-nator has been noticing game crashing while using browsers back in 2022 (HTML5 format) to run the games because of com.stencyl.graphics.G after using Stencyl. 
The picture above shows "Preview Code" in design mode. 

Pre-requisites : 
- basic coding in Haxe. 
- custom import and custom code. 
- create class (free form mode) in code mode. 
- flash.display.Graphics initialisation. For example: 
public var gr:Graphics = Engine.engine.transitionLayer.graphics; which are used in all the display topics below: which require com.stencyl.Engine; 

One thing is common in these codes: 
The position of the drawing is anchored to screen. just like actor is anchored to screen. Even if the applied actors are not anchored to screen. For this case use actor position - camera position. 
No G is required. 
Custom code / Arbitrary code is needed in Desingn mode  

Content to bypass com.stencyl.graphics.G 
3. draw text. (the most complex so far)


 

No comments:

Post a Comment