package Ġcom . github . c zy z by . setup . data . templates . un official Ċ Ċ import Ġcom . github . c zy z by . setup . data . files . Copied File Ċ import Ġcom . github . c zy z by . setup . data . files . path Ċ import Ġcom . github . c zy z by . setup . data . libs . un official . Vis Runtime Ċ import Ġcom . github . c zy z by . setup . data . platforms . Assets Ċ import Ġcom . github . c zy z by . setup . data . platforms . Core Ċ import Ġcom . github . c zy z by . setup . data . project . Project Ċ import Ġcom . github . c zy z by . setup . data . templates . Template Ċ import Ġcom . github . c zy z by . setup . views . Project Template Ċ Ċ /** Ċ Ġ* ĠExample Ġapplication Ġshowing Ġhow Ġto Ġload Ġexported ĠVis Editor Ġproject . ĠProject Ġcan Ġbe Ġalso Ġopened Ġin ĠVis Editor . Ċ Ġ* Ġ@ author ĠK ot cr ab Ċ Ġ*/ Ċ @ Project Template Ċ class ĠVis Editor Basic Template Ġ: ĠTemplate Ġ{ Ċ ĉ override Ġval Ġid Ġ= Ġ" vis Editor Basic Template " Ċ ĉ override Ġval Ġdescription : ĠString Ċĉ ĉ get () Ġ= Ġ" Project Ġtemplate Ġincluded Ġsimple Ġlaunch ers Ġand Ġan Ġ` Application Adapter ` Ġextension Ġshowing Ġhow Ġto Ġload Ġproject Ġexported Ġfrom ĠVis Editor ." ĊĊ ĉ override Ġfun Ġget Application Listener Content ( project : ĠProject ): ĠString Ġ= Ġ""" package Ġ${ project . basic . root Package }; Ċ Ċ import Ġcom . badlogic . gdx . Application Adapter ; Ċ import Ġcom . badlogic . gdx . G dx ; Ċ import Ġcom . badlogic . gdx . graphics . GL 2 0 ; Ċ import Ġcom . badlogic . gdx . graphics . g 2 d . Sprite Batch ; Ċ import Ġcom . badlogic . gdx . utils . Logger ; Ċ import Ġcom . kot cr ab . vis . runtime . Runtime Configuration ; Ċ import Ġcom . kot cr ab . vis . runtime . scene . Scene ; Ċ import Ġcom . kot cr ab . vis . runtime . scene . Scene Config ; Ċ import Ġcom . kot cr ab . vis . runtime . scene . Scene Feature ; Ċ import Ġcom . kot cr ab . vis . runtime . scene . Scene Loader . Scene Parameter ; Ċ import Ġcom . kot cr ab . vis . runtime . scene . Vis Asset Manager ; Ċ Ċ /** Ġ{@ link Ġcom . badlogic . gdx . Application Listener } Ġimplementation Ġshared Ġby Ġall Ġplatforms . Ġ*/ Ċ public Ġclass Ġ${ project . basic . main Class } Ġextends ĠApplication Adapter Ġ{ Ċ ĉ Sprite Batch Ġbatch ; Ċ ĉ Vis Asset Manager Ġmanager ; ĊĊ ĉ Scene Ġscene ; ĊĊ ĉ @ Override Ċ ĉ public Ġvoid Ġcreate Ġ() Ġ{ Ċĉ ĉ batch Ġ= Ġnew ĠSprite Batch (); ĊĊĉ ĉ manager Ġ= Ġnew ĠVis Asset Manager ( batch ); Ġ// creates Ġnew Ġasset Ġmanager Ċĉ ĉ manager . getLogger (). setLevel ( Logger . ERROR ); Ġ// enable Ġdetailed Ġerror Ġlogging ĊĊĉ ĉ // Ġallows Ġto Ġchange Ġdefault Ġruntime Ġsettings Ċĉ ĉ Runtime Configuration Ġconfiguration Ġ= Ġnew ĠRuntime Configuration (); Ċĉ ĉ manager . get Scene Loader (). set Runtime Config ( configuration ); ĊĊĉ ĉ // ĠScene Parameter Ġallows Ġto Ġadd Ġcustom Ġsystems Ġinto Ġart emis - odb Ċĉ ĉ Scene Parameter Ġparameter Ġ= Ġnew ĠScene Parameter (); Ċĉ ĉ parameter . config . add System ( Camera Controller . class , ĠScene Config . Priority . LOW ); Ġ// Ġadd Ġcustom Ġcamera Ġcontroller Ċĉ ĉ parameter . config . disable ( Scene Feature . GROUP _ ID _ MANAGER ); Ġ// ĠScene Parameter Ġalso Ġallows Ġto Ġdisable Ġbuilt - in Ġsystems Ċĉ ĉ scene Ġ= Ġmanager . load Scene Now (" scene / example . scene ", Ġparameter ); Ġ// Ġload Ġexample Ġscene Ċ ĉ } ĊĊ ĉ @ Override Ċ ĉ public Ġvoid Ġrender Ġ() Ġ{ Ċĉ ĉ G dx . gl . gl Clear ( GL 2 0 . GL _ COLOR _ BUFFER _ BIT ); Ċĉ ĉ scene . render (); Ċ ĉ } ĊĊ ĉ @ Override Ċ ĉ public Ġvoid Ġresize Ġ( int Ġwidth , Ġint Ġheight ) Ġ{ Ċĉ ĉ scene . resize ( width , Ġheight ); Ċ ĉ } ĊĊ ĉ @ Override Ċ ĉ public Ġvoid Ġdispose Ġ() Ġ{ Ċĉ ĉ batch . dispose (); Ċĉ ĉ manager . dispose (); Ċ ĉ } Ċ } """ ĊĊ ĉ override Ġfun Ġapply ( project : ĠProject ) Ġ{ Ċĉ ĉ super . apply ( project ) Ċĉ ĉ Vis Runtime (). init iate ( project ) ĊĊĉ ĉ // ĠAdding Ġexported Ġproject : Ċĉ ĉ array Of (" textures . atlas ", Ġ" textures . png "). forEach Ġ{ Ċĉĉ ĉ project . files . add ( Copied File ( projectName Ġ= ĠAssets . ID , Ġpath Ġ= Ġpath ( it ), Ċĉĉĉĉ ĉ original Ġ= Ġpath (" generator ", Ġ" templates ", Ġ" vised itor ", Ġ" exported ", Ġit ))) Ċĉ ĉ } Ċĉ ĉ array Of (" icon . png ", Ġ" lib gdx . png ", Ġ" plus . png "). forEach Ġ{ Ċĉĉ ĉ project . files . add ( Copied File ( projectName Ġ= ĠAssets . ID , Ġpath Ġ= Ġpath (" gfx ", Ġit ), Ċĉĉĉĉ ĉ original Ġ= Ġpath (" generator ", Ġ" templates ", Ġ" vised itor ", Ġ" exported ", Ġ" gfx ", Ġit ))) Ċĉ ĉ } Ċĉ ĉ project . files . add ( Copied File ( projectName Ġ= ĠAssets . ID , Ġpath Ġ= Ġpath (" scene ", Ġ" example . scene "), Ċĉĉĉ ĉ original Ġ= Ġpath (" generator ", Ġ" templates ", Ġ" vised itor ", Ġ" exported ", Ġ" scene ", Ġ" example . scene "))) ĊĊĉ ĉ // ĠAdding ĠVis Editor Ġproject : Ċĉ ĉ array Of (" textures . atlas ", Ġ" textures . png "). forEach Ġ{ Ċĉĉ ĉ project . files . add ( Copied File ( projectName Ġ= ĠAssets . ID , Ġpath Ġ= Ġpath (" assets ", Ġit ), Ċĉĉĉĉ ĉ original Ġ= Ġpath (" generator ", Ġ" templates ", Ġ" vised itor ", Ġ" exported ", Ġit ))) Ċĉ ĉ } Ċĉ ĉ project . files . add ( Copied File ( projectName Ġ= Ġ" vis ", Ġpath Ġ= Ġpath (" project . json "), Ċĉĉĉ ĉ original Ġ= Ġpath (" generator ", Ġ" templates ", Ġ" vised itor ", Ġ" project ", Ġ" project . json "))) Ċĉ ĉ project . files . add ( Copied File ( projectName Ġ= Ġ" vis ", Ġpath Ġ= Ġpath (" modules ", Ġ" version . json "), Ċĉĉĉ ĉ original Ġ= Ġpath (" generator ", Ġ" templates ", Ġ" vised itor ", Ġ" project ", Ġ" modules ", Ġ" version . json "))) Ċĉ ĉ project . files . add ( Copied File ( projectName Ġ= Ġ" vis ", Ġpath Ġ= Ġpath (" modules ", Ġ" settings ", Ġ" export Settings "), Ċĉĉĉ ĉ original Ġ= Ġpath (" generator ", Ġ" templates ", Ġ" vised itor ", Ġ" project ", Ġ" modules ", Ġ" settings ", Ġ" export Settings "))) Ċĉ ĉ project . files . add ( Copied File ( projectName Ġ= Ġ" vis ", Ġpath Ġ= Ġpath (" assets ", Ġ" scene ", Ġ" example . scene "), Ċĉĉĉ ĉ original Ġ= Ġpath (" generator ", Ġ" templates ", Ġ" vised itor ", Ġ" project ", Ġ" assets ", Ġ" scene ", Ġ" example . scene "))) Ċĉ ĉ array Of (" icon . png ", Ġ" lib gdx . png ", Ġ" plus . png "). forEach Ġ{ Ċĉĉ ĉ project . files . add ( Copied File ( projectName Ġ= Ġ" vis ", Ġpath Ġ= Ġpath (" assets ", Ġ" gfx ", Ġit ), Ċĉĉĉĉ ĉ original Ġ= Ġpath (" generator ", Ġ" templates ", Ġ" vised itor ", Ġ" project ", Ġ" assets ", Ġ" gfx ", Ġit ))) Ċĉ ĉ } ĊĊĉ ĉ add SourceFile ( project Ġ= Ġproject , Ġplatform Ġ= ĠCore . ID , ĠpackageName Ġ= Ġproject . basic . root Package , Ċĉĉĉ ĉ fileName Ġ= Ġ" Camera Controller . java ", Ġcontent Ġ= Ġ""" package Ġ${ project . basic . root Package }; Ċ Ċ import Ġcom . art emis . Aspect ; Ċ import Ġcom . art emis . Entity System ; Ċ import Ġcom . badlogic . gdx . G dx ; Ċ import Ġcom . badlogic . gdx . Input ; Ċ import Ġcom . badlogic . gdx . graphics . Or tho graphic Camera ; Ċ import Ġcom . kot cr ab . vis . runtime . system . Camera Manager ; Ċ Ċ /** ĠExample Ġof Ġcustom Ġ{@ link ĠEntity System } Ġallowing Ġto Ġcontrol Ġcamera Ġposition Ġand Ġzoom Ġusing Ġkeyboard . Ġ*/ Ċ public Ġclass ĠCamera Controller Ġextends ĠEntity System Ġ{ Ċ ĉ private ĠCamera Manager Ġcamera Manager ; Ġ// Ġauto Ġinjected Ġby ĠArt emis ĊĊ ĉ private Ġstatic Ġfinal Ġfloat ĠCAM ERA _ MOVE _ DELTA Ġ= Ġ 0 . 1 f ; Ċ ĉ private Ġstatic Ġfinal Ġfloat ĠCAM ERA _ ZO OM _ DELTA Ġ= Ġ 0 . 0 1 f ; ĊĊ ĉ public ĠCamera Controller Ġ() Ġ{ Ċĉ ĉ super ( Aspect . all ()); Ċ ĉ } ĊĊ ĉ @ Override Ċ ĉ protected Ġvoid Ġprocess System Ġ() Ġ{ Ċĉ ĉ Or tho graphic Camera Ġcamera Ġ= Ġcamera Manager . get Camera (); Ċĉ ĉ if Ġ( G dx . input . is Key Pressed ( Input . Keys . W )) Ġ{ Ċĉĉ ĉ camera . position . y Ġ+= ĠCAM ERA _ MOVE _ DELTA ; Ċĉ ĉ } Ċĉ ĉ if Ġ( G dx . input . is Key Pressed ( Input . Keys . S )) Ġ{ Ċĉĉ ĉ camera . position . y Ġ-= ĠCAM ERA _ MOVE _ DELTA ; Ċĉ ĉ } Ċĉ ĉ if Ġ( G dx . input . is Key Pressed ( Input . Keys . A )) Ġ{ Ċĉĉ ĉ camera . position . x Ġ-= ĠCAM ERA _ MOVE _ DELTA ; Ċĉ ĉ } Ċĉ ĉ if Ġ( G dx . input . is Key Pressed ( Input . Keys . D )) Ġ{ Ċĉĉ ĉ camera . position . x Ġ+= ĠCAM ERA _ MOVE _ DELTA ; Ċĉ ĉ } ĊĊĉ ĉ if Ġ( G dx . input . is Key Pressed ( Input . Keys . Q ) Ġ&& Ġcamera . zoom Ġ> Ġ 0 . 1 f ) Ġ{ Ċĉĉ ĉ camera . zoom Ġ-= ĠCAM ERA _ ZO OM _ DELTA ; Ċĉ ĉ } Ċĉ ĉ if Ġ( G dx . input . is Key Pressed ( Input . Keys . E ) Ġ&& Ġcamera . zoom Ġ< Ġ 3 f ) Ġ{ Ċĉĉ ĉ camera . zoom Ġ+= ĠCAM ERA _ ZO OM _ DELTA ; Ċĉ ĉ } Ċ ĉ } Ċ } "" "); ĊĊ ĉ } Ċ } Ċ