Package fr.formiko.formiko
Class Main
java.lang.Object
fr.formiko.formiko.Main
Launch class.
Main file have all the shortcut on getter or setter that are curently used
Main file have all the shortcut on getter or setter that are curently used
- Author:
- Hydrolien
-
Field Summary
Modifier and TypeFieldDescriptionprivate static int
private static fr.formiko.usual.Chrono
private static int
private static Data
Data use by GUIprivate static boolean
private static long
private static long
private static boolean
private static fr.formiko.usual.media.audio.MusicPlayer
private static boolean
private static byte
private static Options
Use only after iniOp().private static boolean
private static Partie
private static fr.formiko.usual.images.Pixel
private static boolean
private static fr.formiko.usual.Time
private static Options
Use only before iniOp() to avoid nullPointerException.private static long
private static ThScript
private static boolean
private static View
View use everywere to update user interfaceprivate static boolean
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
doAction
(int x) static void
static int
End the Chrono & return the time.static int
End the Chrono & return the time.static boolean
static String
static boolean
static int[]
static int
static byte
static int
static int
static int
static Carte
getCarte()
static CCase
getCCase
(int x, int y) static fr.formiko.usual.Chrono
getCh()
static Data
getData()
static LocalDateTime
static byte
static int
getDimX()
static int
static int
getDimY()
static boolean
static boolean
static Espece
static Espece
getEspeceById
(int id) static FFrame
getF()
static boolean
static FFolder
static Font
getFont1()
static Font
getFont1
(double d) static Font
getFont2()
static int
static int
static boolean
static Fourmiliere
getFourmiliereById
(int id) static boolean
static GCase
getGc()
static GEspece
getGe()
static GEspece
static GInsecte
getGi()
static GJoueur
getGj()
static int
static Joueur
getJoueurById
(int id) static boolean
static int
static byte
static GJoueur
static boolean
static long
static Carte
getMap()
static int
static fr.formiko.usual.media.audio.MusicPlayer
getMp()
static int
static int
static byte
static Options
getOp()
static boolean
static boolean
static fr.formiko.usual.Os
getOs()
static Partie
static fr.formiko.usual.images.Pixel
static Fourmi
static Joueur
static int
static double
static byte
static boolean
static Script
static int
static int
getTailleElementGraphique
(int x) static int
getTailleElementGraphiqueX
(int x) static int
getTailleElementGraphiqueY
(int x) static ThScript
static fr.formiko.usual.Time
getTime()
static int
getTour()
static View
getView()
static double
static int
getWidth()
static void
Launch normal exit on shutDown.static void
ini()
static void
iniCpt()
Initializes counter cpt of IEspece, Joueur, Fourmiliere ,ObjetAId.static void
Load language.static void
pre launch.static void
iniOp()
Load Options.static void
Initializes Options, key, language, time data, musique, os value.static boolean
isCLI()
static boolean
static boolean
launch()
Launch in the void main if there is not other args than -something (ex : -d).static void
static void
Lauch the game.static void
quit()
static void
quit
(int exitCode) Try to exit normally.static void
quitter()
static void
repaint()
static void
saveOp
(boolean threaded) static void
setAvancementChargement
(int x) static void
static void
setDifficulté
(byte x) static void
setDifficulté
(int x) static void
setFirstGame
(boolean b) static void
static void
static void
static void
setLanguage
(int x) static void
setLaunchFromLauncher
(boolean launchFromLauncher) Update the boolean & every value that depend of it.static void
Print on the window a message about game loading.static void
setModeCLI
(boolean b) static void
setNbrDeTour
(int x) static void
setOs
(fr.formiko.usual.Os o) static void
static void
static void
setRetournerAuMenu
(boolean b) static void
static void
setTour
(int x) static void
setTuto
(boolean b) static void
static void
startCh()
static void
startCh
(fr.formiko.usual.Chrono chTemp) static void
static void
tour()
Play a turn.
-
Field Details
-
op
Use only after iniOp(). -
tempOp
Use only before iniOp() to avoid nullPointerException. -
data
Data use by GUI -
view
View use everywere to update user interface -
ch
private static fr.formiko.usual.Chrono ch -
lon
private static long lon -
lonTotal
private static long lonTotal -
tempsDeDébutDeJeu
private static long tempsDeDébutDeJeu -
pa
-
niveauDeDétailDeLAffichage
private static byte niveauDeDétailDeLAffichage -
pi
private static fr.formiko.usual.images.Pixel pi -
key
-
avancementChargement
private static int avancementChargement -
tem
private static fr.formiko.usual.Time tem -
retournerAuMenu
private static boolean retournerAuMenu -
tuto
private static boolean tuto -
ths
-
modeCLI
private static boolean modeCLI -
cptMessageChargement
private static int cptMessageChargement -
mp
private static fr.formiko.usual.media.audio.MusicPlayer mp -
needToInitialize
private static boolean needToInitialize -
openMenuFirst
private static boolean openMenuFirst -
wantToQuit
private static boolean wantToQuit -
launchFromLauncher
private static boolean launchFromLauncher
-
-
Constructor Details
-
Main
public Main()
-
-
Method Details
-
main
Lauch the game.
It can have some args to do special thing.
-d - set on the debug mode.
trad make sur that every language file is 100% translated. It can auto translate some texte if the python file and translation api are on the same folder.
op save the Options.txt file
Others args are not fuly usable for now.- Parameters:
args
- [] It can contain -d, trad, son, op, test, supprimer
-
iniLaunch
public static void iniLaunch()pre launch. -
launch
public static boolean launch()Launch in the void main if there is not other args than -something (ex : -d). -
isCLI
public static boolean isCLI() -
getNiveauDeDétailDeLAffichage
public static byte getNiveauDeDétailDeLAffichage() -
getEspece
-
getEspeceById
-
getGEspece
-
getJoueurById
-
getFourmiliereById
-
getF
-
getOp
-
saveOp
public static void saveOp(boolean threaded) -
getCh
public static fr.formiko.usual.Chrono getCh() -
getKey
-
getPartie
-
setPartie
-
getPiFond
public static fr.formiko.usual.images.Pixel getPiFond() -
getAvancementChargement
public static int getAvancementChargement() -
setAvancementChargement
public static void setAvancementChargement(int x) -
getTime
public static fr.formiko.usual.Time getTime() -
getRetournerAuMenu
public static boolean getRetournerAuMenu() -
setRetournerAuMenu
public static void setRetournerAuMenu(boolean b) -
getOs
public static fr.formiko.usual.Os getOs() -
setOs
public static void setOs(fr.formiko.usual.Os o) -
getFolder
-
setFolder
-
setTuto
public static void setTuto(boolean b) -
getFirstGame
public static boolean getFirstGame() -
setFirstGame
public static void setFirstGame(boolean b) -
getData
-
setData
-
getView
-
setView
-
setModeCLI
public static void setModeCLI(boolean b) -
getLonTotal
public static long getLonTotal() -
getMp
public static fr.formiko.usual.media.audio.MusicPlayer getMp() -
getPlayingAnt
-
setPlayingAnt
-
getPlayingJoueur
-
getActionGameOn
public static boolean getActionGameOn() -
estWindows
public static boolean estWindows() -
get
-
getScript
-
getThScript
-
setScript
-
launchScript
public static void launchScript() -
stopScript
public static void stopScript() -
repaint
public static void repaint() -
doAction
public static void doAction(int x) -
getDimX
public static int getDimX() -
getDimY
public static int getDimY() -
getWidth
public static int getWidth() -
getHeight
public static int getHeight() -
getTailleElementGraphique
public static int getTailleElementGraphique(int x) -
getTailleElementGraphiqueX
public static int getTailleElementGraphiqueX(int x) -
getTailleElementGraphiqueY
public static int getTailleElementGraphiqueY(int x) -
getRacioEspaceLibre
public static double getRacioEspaceLibre() -
getDimXCarte
public static int getDimXCarte() -
getLanguage
public static byte getLanguage() -
setLanguage
public static void setLanguage(int x) -
getbuttonSizeZoom
public static int getbuttonSizeZoom() -
getbuttonSizeAction
public static int getbuttonSizeAction() -
getbuttonSizeTX
public static int getbuttonSizeTX() -
getMaxMessageDisplay
public static int getMaxMessageDisplay() -
getDrawGrid
public static boolean getDrawGrid() -
getOrientedObjectOnMap
public static boolean getOrientedObjectOnMap() -
getForceQuit
public static boolean getForceQuit() -
getBorderButtonSize
public static byte getBorderButtonSize() -
getDrawRelationsIcons
public static boolean getDrawRelationsIcons() -
getFont1
-
getFont1
-
setFont1
-
getFont2
-
setFont2
-
getFontSizeText
public static int getFontSizeText() -
getFontSizeTitle
public static int getFontSizeTitle() -
getFullscreen
public static boolean getFullscreen() -
getLoadingDuringMenus
public static boolean getLoadingDuringMenus() -
getKeepFilesRotated
public static boolean getKeepFilesRotated() -
getSizeOfMapLines
public static int getSizeOfMapLines() -
getPositionCase
public static int getPositionCase() -
getRealisticSize
public static byte getRealisticSize() -
getGi
-
getListeJoueur
-
getGj
-
getGc
-
getCCase
-
setNbrDeTour
public static void setNbrDeTour(int x) -
setTour
public static void setTour(int x) -
getNbrDeTour
public static int getNbrDeTour() -
getTour
public static int getTour() -
getDifficulté
public static byte getDifficulté() -
setDifficulté
public static void setDifficulté(byte x) -
setDifficulté
public static void setDifficulté(int x) -
getDateDeCréation
-
getAvaibleSpecies
public static int[] getAvaibleSpecies() -
getNbrDeJoueur
public static int getNbrDeJoueur() -
getMap
-
getCarte
-
getVitesseDeJeu
public static double getVitesseDeJeu() -
getGe
-
getOpenMenuFirst
public static boolean getOpenMenuFirst() -
dontOpenMenuFirst
public static void dontOpenMenuFirst() -
isLaunchFromLauncher
public static boolean isLaunchFromLauncher() -
setLaunchFromLauncher
public static void setLaunchFromLauncher(boolean launchFromLauncher) Update the boolean & every value that depend of it. -
initialisation
public static void initialisation()Initializes Options, key, language, time data, musique, os value. And check the integrity of the file tree. -
ini
public static void ini() -
iniCpt
public static void iniCpt()Initializes counter cpt of IEspece, Joueur, Fourmiliere ,ObjetAId. -
iniOp
public static void iniOp()Load Options. -
iniLangue
public static void iniLangue()Load language.
If language are not fully translated, it will add data of default language. -
setMessageChargement
Print on the window a message about game loading.
If you tried to use it before the creating of a new FPanelChargement, message will not appear on the window. -
startCh
public static void startCh() -
endCh
End the Chrono & return the time. -
startCh
public static void startCh(fr.formiko.usual.Chrono chTemp) -
endCh
End the Chrono & return the time. -
quit
public static void quit(int exitCode) Try to exit normally.
Save score informations.
Clear temporary Images.
Save time played.
Stop java with code 0.
If something went wrong stop java with code 1.- Parameters:
exitCode
- the exit code used.
-
quit
public static void quit() -
quitter
public static void quitter() -
handleQuit
public static void handleQuit()Launch normal exit on shutDown. From ctr-c for exemple. -
tour
public static void tour()Play a turn.
1a updating Case resources.
2a Make humain player and AI play.
3a Make Insecte play.
4a Add new Insectes.
-