Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (775)
Games in Android Showcase (230)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
  JavaGaming.org - Pastebin



Author: buddyBro (posted 2018-02-28 16:45:17, viewed 205 times)

1   2   3   4   5   6   7   8   9   10   11   12   13   14   15   16   17   18   19   20   21   22   23   24   25   26   27   28   29   30   31   32   33   34   35   36   37   38   39   40   41   42   43   44   45   46   47   48   49   50   51   52   53   54   55   56   57   58   59   60   61   62   63   64   65   66   67   68   69   70   71   72   73   74   75   76   77   78   79   80   81   82   83   84   85   86   87   88   89   90   91   92   93   94   95   96   97   98   99  
ModelCreator modelCreator = new ModelCreator();

        SegmentEditable body = new SegmentEditable(); // 0
        SegmentEditable shell = new SegmentEditable(); // 1
        SegmentEditable head = new SegmentEditable(); // 2
        SegmentEditable horn = new SegmentEditable(); // 3
        SegmentEditable eyeL = new SegmentEditable(); // 4
        SegmentEditable eyeR = new SegmentEditable(); // 5
        SegmentEditable legFL = new SegmentEditable(); // 6
        SegmentEditable legFR = new SegmentEditable(); // 7
        SegmentEditable legML = new SegmentEditable(); // 8
        SegmentEditable legMR = new SegmentEditable(); // 9
        SegmentEditable legBL = new SegmentEditable(); // 10
        SegmentEditable legBR = new SegmentEditable(); // 11

        float lightScale = 2;
        float[] darkColor = new float[] {.4f, .2f, .1f, 1};
        float[] lightColor = new float[] {.5f, .3f, .2f, 1};
        MathArrays.scale(darkColor, lightScale);
        MathArrays.scale(lightColor, lightScale);
        body.setColor(darkColor);
        shell.setColor(lightColor);
        head.setColor(darkColor);
        horn.setColor(darkColor);
        eyeL.setColor(lightColor);
        eyeR.setColor(lightColor);
        legFL.setColor(lightColor);
        legFR.setColor(lightColor);
        legML.setColor(lightColor);
        legMR.setColor(lightColor);
        legBL.setColor(lightColor);
        legBR.setColor(lightColor);

        body.init(null, null);
        shell.init(body, null);
        head.init(body, null);
        horn.init(body, null);
        eyeL.init(body, null);
        eyeR.init(body, null);
        legFL.init(body, null);
        legFR.init(body, null);
        legML.init(body, null);
        legMR.init(body, null);
        legBL.init(body, null);
        legBR.init(body, null);

        body.setScale(3, 7.9f, 4);
        shell.setScale(5, 7, 4);
        head.setScale(3, 4, 3);
        horn.setScale(1, 1, 4);
        eyeL.setScale(1, 1, 1);
        eyeR.setScale(1, 1, 1);
        legFL.setScale(1, 1, 4);
        legFR.setScale(1, 1, 4);
        legML.setScale(1, 1, 4);
        legMR.setScale(1, 1, 4);
        legBL.setScale(1, 1, 4);
        legBR.setScale(1, 1, 4);

        body.setTranslation(0, 0, 0);
        shell.setTranslation(0, .5f, 1);
        head.setTranslation(0, 6, -.5f);
        horn.setTranslation(0, 8.5f, 1);
        eyeL.setTranslation(-2, 6.5f, -.5f);
        eyeR.setTranslation(2, 6.5f, -.5f);
        legFL.setTranslation(-3, 3.5f, -2);
        legFR.setTranslation(3, 3.5f, -2);
        legML.setTranslation(-3, .5f, -2);
        legMR.setTranslation(3, .5f, -2);
        legBL.setTranslation(-3, -2.5f, -2);
        legBR.setTranslation(3, -2.5f, -2);

        modelCreator.addSegment(body);
        modelCreator.addSegment(shell);
        modelCreator.addSegment(head);
        modelCreator.addSegment(horn);
        modelCreator.addSegment(eyeL);
        modelCreator.addSegment(eyeR);
        modelCreator.addSegment(legFL);
        modelCreator.addSegment(legFR);
        modelCreator.addSegment(legML);
        modelCreator.addSegment(legMR);
        modelCreator.addSegment(legBL);
        modelCreator.addSegment(legBR);

        AnimationCreator animationCreator = new AnimationCreator(4, 12);
        animationCreator.setTotalTime(0, 10);
        animationCreator.setTotalTime(1, 10);
        animationCreator.setTotalTime(2, 10);
        animationCreator.setTotalTime(3, 10);
        animationCreator.setFrame(1, 6, 0, 1, 0, 0);
        animationCreator.setFrame(1, 8, 0, 1, 0, 0);
        animationCreator.setFrame(1, 10, 0, 1, 0, 0);
        animationCreator.setFrame(3, 7, 0, 1, 0, 0);
        animationCreator.setFrame(3, 9, 0, 1, 0, 0);
        animationCreator.setFrame(3, 11, 0, 1, 0, 0);
        modelCreator.setAnimationData(animationCreator);

        return modelCreator.getModelData();





Dump your java code here :



Special syntax:
  • To highlight a line (yellow background), prefix it with '@@'
  • To indicate that a line should be removed (red background), prefix it with '-'
  • To indicate that a line should be added (green background), prefix it with '+'
  • To post multiple snippets, seperate them by '~~~~'
  EOF
 
EgonOlsen (1869 views)
2018-06-10 19:43:48

EgonOlsen (1901 views)
2018-06-10 19:43:44

EgonOlsen (1258 views)
2018-06-10 19:43:20

DesertCoockie (1703 views)
2018-05-13 18:23:11

nelsongames (1378 views)
2018-04-24 18:15:36

nelsongames (2003 views)
2018-04-24 18:14:32

ivj94 (2753 views)
2018-03-24 14:47:39

ivj94 (1955 views)
2018-03-24 14:46:31

ivj94 (3045 views)
2018-03-24 14:43:53

Solater (1090 views)
2018-03-17 05:04:08
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!