home *** CD-ROM | disk | FTP | other *** search
/ Java for 3D & VRML Worlds / Java for 3d and VRML Worlds.iso / multiuser / circus2 / scripts / circus.class (.txt) < prev    next >
Encoding:
Java Class File  |  1996-09-12  |  21.0 KB  |  1,186 lines

  1. import vrml.Event;
  2. import vrml.field.ConstSFBool;
  3. import vrml.field.ConstSFString;
  4. import vrml.field.ConstSFTime;
  5. import vrml.field.MFColor;
  6. import vrml.field.SFBool;
  7. import vrml.field.SFColor;
  8. import vrml.field.SFInt32;
  9. import vrml.field.SFNode;
  10. import vrml.field.SFRotation;
  11. import vrml.field.SFTime;
  12. import vrml.field.SFVec3f;
  13. import vrml.node.Script;
  14. import vs.Vscp;
  15.  
  16. public class circus extends Script {
  17.    // $FF: renamed from: X int
  18.    static int field_0;
  19.    // $FF: renamed from: Y int
  20.    static int field_1 = 1;
  21.    // $FF: renamed from: Z int
  22.    static int field_2 = 2;
  23.    static int DEGREE = 3;
  24.    // $FF: renamed from: R int
  25.    static int field_3;
  26.    // $FF: renamed from: G int
  27.    static int field_4 = 1;
  28.    // $FF: renamed from: B int
  29.    static int field_5 = 2;
  30.    float Radian = (180F / (float)Math.PI);
  31.    SFNode WorldNode;
  32.    SFBool WorldTimer;
  33.    MFColor WorldSkyCol;
  34.    SFInt32 WorldLightSwitch;
  35.    SFRotation AirShipRot;
  36.    SFColor FerrisRideCol;
  37.    SFVec3f FerrisRidePos;
  38.    SFVec3f FerrisExitPos;
  39.    SFVec3f FerrisWheelPos;
  40.    SFRotation FerrisWheelRot;
  41.    SFVec3f GondolaFloorPos;
  42.    SFVec3f GondolaFencePos;
  43.    SFTime GondolaSound_start;
  44.    SFTime GondolaSound_stop;
  45.    SFRotation[] GondolaRot = new SFRotation[10];
  46.    SFVec3f[] GondolaPos = new SFVec3f[10];
  47.    SFBool GondolaViewBind;
  48.    SFRotation GondolaViewRot;
  49.    SFRotation ParadeStageRot;
  50.    SFVec3f ParadeSoundPos;
  51.    SFTime ParadeSound_start;
  52.    SFTime ParadeSound_stop;
  53.    SFBool Piero1Sw;
  54.    SFTime Piero1StartTime;
  55.    SFTime Piero1StopTime;
  56.    SFVec3f Piero1Pos;
  57.    SFRotation Piero1Rot;
  58.    SFVec3f AccordionPos;
  59.    SFVec3f Accordion1Pos;
  60.    SFVec3f Accordion2Pos;
  61.    SFRotation AccordionRot;
  62.    SFBool Piero2Sw;
  63.    SFTime Piero2StartTime;
  64.    SFTime Piero2StopTime;
  65.    SFVec3f Piero2Pos;
  66.    SFRotation Piero2Rot;
  67.    SFVec3f BarrelPos;
  68.    SFRotation BarrelRot;
  69.    SFBool Piero3Sw;
  70.    SFTime Piero3StartTime;
  71.    SFTime Piero3StopTime;
  72.    SFVec3f Piero3Pos;
  73.    SFRotation Piero3Rot;
  74.    SFBool KumaSw;
  75.    SFTime KumaStartTime;
  76.    SFTime KumaStopTime;
  77.    SFVec3f KumaPos;
  78.    SFRotation KumaRot;
  79.    SFBool KumaBicycleSw;
  80.    SFBool AshikaSw;
  81.    SFTime AshikaStartTime;
  82.    SFTime AshikaStopTime;
  83.    SFVec3f AshikaPos;
  84.    SFRotation AshikaRot;
  85.    SFBool AshikaBallSw;
  86.    SFVec3f AshikaBallPos;
  87.    SFRotation AshikaBallRot;
  88.    SFTime AshikaSound_start;
  89.    SFTime AshikaSound_stop;
  90.    boolean WorldConstructorInvoked = false;
  91.    int WorldSkyFlg;
  92.    int ParadeFlg;
  93.    int CurrentTime = 60;
  94.    int EclipseCnt;
  95.    int sunriseStartTime = 60;
  96.    int sunriseMidStartTime = 70;
  97.    int sunriseMidEndTime = 70;
  98.    int sunriseEndTime = 120;
  99.    int sunsetStartTime = 240;
  100.    int sunsetMidStartTime = 250;
  101.    int sunsetMidEndTime = 250;
  102.    int sunsetEndTime = 300;
  103.    float nightColorR = 0.1F;
  104.    float nightColorG = 0.1F;
  105.    float nightColorB = 0.35F;
  106.    float sunriseColorR = 0.6F;
  107.    float sunriseColorG = 0.1F;
  108.    float sunriseColorB = 0.08F;
  109.    float daylightColorR = 0.44F;
  110.    float daylightColorG = 0.49F;
  111.    float daylightColorB = 1.0F;
  112.    float sunsetColorR = 0.6F;
  113.    float sunsetColorG = 0.1F;
  114.    float sunsetColorB = 0.08F;
  115.    int IllumiNo;
  116.    int IllumiCnt;
  117.    float IllumiR = 1.0F;
  118.    float IllumiG = 1.0F;
  119.    float IllumiB = 1.0F;
  120.    boolean FerrisRideColorSw = true;
  121.    float FerrisWheelR = 22.5F;
  122.    float FerrisWheelY = 28.5F;
  123.    float FerrisRotateAngle;
  124.    int RideGondolaNum;
  125.    int RidePerson;
  126.    int RideSeat;
  127.    boolean Piero1MoveFlg = false;
  128.    boolean Piero2MoveFlg = false;
  129.    boolean Piero3MoveFlg = false;
  130.    int Piero1Cnt;
  131.    int Piero2Cnt;
  132.    int Piero3Cnt;
  133.    int Piero2Dir;
  134.    float Piero2PosZ;
  135.    float Piero2RotD;
  136.    boolean AshikaMoveFlg = false;
  137.    int AshikaCnt;
  138.    int AshikaMode;
  139.    float AshikaBallRotX;
  140.    float AshikaBallRotZ;
  141.    float[][] AshikaBallData1 = new float[][]{{38.4F, 0.4F}, {38.1F, 0.9F}, {37.8F, 1.25F}, {37.5F, 1.5F}, {37.2F, 1.6F}, {36.9F, 1.8F}, {36.6F, 1.9F}, {36.3F, 1.9F}, {36.0F, 1.8F}, {35.7F, 1.6F}};
  142.    float[] AshikaBallData2 = new float[]{1.6F, 1.7F, 1.8F, 1.9F, 2.0F, 2.0F, 1.9F, 1.8F, 1.7F, 1.6F};
  143.    boolean KumaMoveFlg = false;
  144.    float KumaAng;
  145.    int KumaCnt;
  146.  
  147.    public void initialize() {
  148.       this.WorldNode = (SFNode)((Script)this).getField("WorldNode");
  149.       this.WorldTimer = (SFBool)((Script)this).getEventOut("WorldTimer_enabled");
  150.       this.WorldSkyCol = (MFColor)((Script)this).getEventOut("WorldSky_color");
  151.       this.WorldLightSwitch = (SFInt32)((Script)this).getEventOut("WorldLight_switch");
  152.       this.AirShipRot = (SFRotation)((Script)this).getEventOut("Airship_rotation");
  153.       this.FerrisRideCol = (SFColor)((Script)this).getEventOut("FerrisRide_color");
  154.       this.FerrisRidePos = (SFVec3f)((Script)this).getEventOut("FerrisRide_position");
  155.       this.FerrisExitPos = (SFVec3f)((Script)this).getEventOut("FerrisExit_position");
  156.       this.FerrisWheelPos = (SFVec3f)((Script)this).getEventOut("FerrisWheel_position");
  157.       this.FerrisWheelRot = (SFRotation)((Script)this).getEventOut("FerrisWheel_rotation");
  158.       this.GondolaFloorPos = (SFVec3f)((Script)this).getEventOut("GondolaFloor_position");
  159.       this.GondolaFencePos = (SFVec3f)((Script)this).getEventOut("GondolaFence_position");
  160.       this.GondolaSound_start = (SFTime)((Script)this).getEventOut("GondolaSound_start");
  161.       this.GondolaSound_stop = (SFTime)((Script)this).getEventOut("GondolaSound_stop");
  162.       this.GondolaViewBind = (SFBool)((Script)this).getEventOut("GondolaView_bind");
  163.       this.GondolaViewRot = (SFRotation)((Script)this).getEventOut("GondolaView_rotation");
  164.       this.ParadeStageRot = (SFRotation)((Script)this).getEventOut("ParadeStage_rotation");
  165.       this.ParadeSoundPos = (SFVec3f)((Script)this).getEventOut("ParadeSound_position");
  166.       this.ParadeSound_start = (SFTime)((Script)this).getEventOut("ParadeSound_start");
  167.       this.ParadeSound_stop = (SFTime)((Script)this).getEventOut("ParadeSound_stop");
  168.       this.Piero1Sw = (SFBool)((Script)this).getEventOut("Piero1_sw");
  169.       this.Piero1StartTime = (SFTime)((Script)this).getEventOut("Piero1_start");
  170.       this.Piero1StopTime = (SFTime)((Script)this).getEventOut("Piero1_stop");
  171.       this.Piero1Pos = (SFVec3f)((Script)this).getEventOut("Piero1_position");
  172.       this.Piero1Rot = (SFRotation)((Script)this).getEventOut("Piero1_rotation");
  173.       this.AccordionPos = (SFVec3f)((Script)this).getEventOut("Piero1Accordion_position");
  174.       this.Accordion1Pos = (SFVec3f)((Script)this).getEventOut("Piero1Accordion1_position");
  175.       this.Accordion2Pos = (SFVec3f)((Script)this).getEventOut("Piero1Accordion2_position");
  176.       this.AccordionRot = (SFRotation)((Script)this).getEventOut("Piero1Accordion_rotation");
  177.       this.Piero2Sw = (SFBool)((Script)this).getEventOut("Piero2_sw");
  178.       this.Piero2StartTime = (SFTime)((Script)this).getEventOut("Piero2_start");
  179.       this.Piero2StopTime = (SFTime)((Script)this).getEventOut("Piero2_stop");
  180.       this.Piero2Pos = (SFVec3f)((Script)this).getEventOut("Piero2_position");
  181.       this.Piero2Rot = (SFRotation)((Script)this).getEventOut("Piero2_rotation");
  182.       this.BarrelPos = (SFVec3f)((Script)this).getEventOut("Piero2Barrel_position");
  183.       this.BarrelRot = (SFRotation)((Script)this).getEventOut("Piero2Barrel_rotation");
  184.       this.Piero3Sw = (SFBool)((Script)this).getEventOut("Piero3_sw");
  185.       this.Piero3StartTime = (SFTime)((Script)this).getEventOut("Piero3_start");
  186.       this.Piero3StopTime = (SFTime)((Script)this).getEventOut("Piero3_stop");
  187.       this.Piero3Pos = (SFVec3f)((Script)this).getEventOut("Piero3_position");
  188.       this.Piero3Rot = (SFRotation)((Script)this).getEventOut("Piero3_rotation");
  189.       this.KumaSw = (SFBool)((Script)this).getEventOut("Kuma_sw");
  190.       this.KumaStartTime = (SFTime)((Script)this).getEventOut("Kuma_start");
  191.       this.KumaStopTime = (SFTime)((Script)this).getEventOut("Kuma_stop");
  192.       this.KumaPos = (SFVec3f)((Script)this).getEventOut("Kuma_position");
  193.       this.KumaRot = (SFRotation)((Script)this).getEventOut("Kuma_rotation");
  194.       this.KumaBicycleSw = (SFBool)((Script)this).getEventOut("Kuma_bicycle_sw");
  195.       this.AshikaSw = (SFBool)((Script)this).getEventOut("Ashika_sw");
  196.       this.AshikaStartTime = (SFTime)((Script)this).getEventOut("Ashika_start");
  197.       this.AshikaStopTime = (SFTime)((Script)this).getEventOut("Ashika_stop");
  198.       this.AshikaPos = (SFVec3f)((Script)this).getEventOut("Ashika_position");
  199.       this.AshikaRot = (SFRotation)((Script)this).getEventOut("Ashika_rotation");
  200.       this.AshikaBallSw = (SFBool)((Script)this).getEventOut("AshikaBall_sw");
  201.       this.AshikaBallPos = (SFVec3f)((Script)this).getEventOut("AshikaBall_position");
  202.       this.AshikaBallRot = (SFRotation)((Script)this).getEventOut("AshikaBall_rotation");
  203.       this.AshikaSound_start = (SFTime)((Script)this).getEventOut("AshikaSound_start");
  204.       this.AshikaSound_stop = (SFTime)((Script)this).getEventOut("AshikaSound_stop");
  205.    }
  206.  
  207.    public void processEvent(Event var1) {
  208.       String var2 = var1.getName();
  209.       double var3 = var1.getTimeStamp();
  210.       if (var2.equals("WorldMove")) {
  211.          this.WorldMove((ConstSFTime)var1.getValue(), var3);
  212.       } else if (var2.equals("WorldSync")) {
  213.          this.WorldSync((ConstSFString)var1.getValue(), var3);
  214.       } else if (var2.equals("ShareFerrisRotate")) {
  215.          this.ShareFerrisRotate((ConstSFString)var1.getValue(), var3);
  216.       } else if (var2.equals("ShareRidePerson")) {
  217.          this.ShareRidePerson((ConstSFString)var1.getValue(), var3);
  218.       } else if (var2.equals("ShareCurrentTime")) {
  219.          this.ShareCurrentTime((ConstSFString)var1.getValue(), var3);
  220.       } else if (var2.equals("FerrisRide")) {
  221.          this.FerrisRide((ConstSFString)var1.getValue(), var3);
  222.       } else if (var2.equals("EclipsePick")) {
  223.          this.EclipsePick((ConstSFBool)var1.getValue(), var3);
  224.       } else if (var2.equals("EclipsePickShare")) {
  225.          this.EclipsePickShare((ConstSFString)var1.getValue(), var3);
  226.       } else if (var2.equals("FerrisRidePick")) {
  227.          this.FerrisRidePick((ConstSFBool)var1.getValue(), var3);
  228.       } else if (var2.equals("FerrisExitPick")) {
  229.          this.FerrisExitPick((ConstSFBool)var1.getValue(), var3);
  230.       } else if (var2.equals("Piero1PickShare")) {
  231.          this.Piero1PickShare((ConstSFString)var1.getValue(), var3);
  232.       } else if (var2.equals("Piero1Pick")) {
  233.          this.Piero1Pick((ConstSFBool)var1.getValue(), var3);
  234.       } else if (var2.equals("Piero2PickShare")) {
  235.          this.Piero2PickShare((ConstSFString)var1.getValue(), var3);
  236.       } else if (var2.equals("Piero2Pick")) {
  237.          this.Piero2Pick((ConstSFBool)var1.getValue(), var3);
  238.       } else if (var2.equals("Piero3PickShare")) {
  239.          this.Piero3PickShare((ConstSFString)var1.getValue(), var3);
  240.       } else if (var2.equals("Piero3Pick")) {
  241.          this.Piero3Pick((ConstSFBool)var1.getValue(), var3);
  242.       } else if (var2.equals("AshikaPickShare")) {
  243.          this.AshikaPickShare((ConstSFString)var1.getValue(), var3);
  244.       } else if (var2.equals("AshikaPick")) {
  245.          this.AshikaPick((ConstSFBool)var1.getValue(), var3);
  246.       } else if (var2.equals("AshikaBallMove")) {
  247.          this.AshikaBallMove((ConstSFTime)var1.getValue(), var3);
  248.       } else if (var2.equals("AshikaBallPickShare")) {
  249.          this.AshikaBallPickShare((ConstSFString)var1.getValue(), var3);
  250.       } else if (var2.equals("AshikaBallPick")) {
  251.          this.AshikaBallPick((ConstSFBool)var1.getValue(), var3);
  252.       } else if (var2.equals("KumaPickShare")) {
  253.          this.KumaPickShare((ConstSFString)var1.getValue(), var3);
  254.       } else if (var2.equals("KumaPick")) {
  255.          this.KumaPick((ConstSFBool)var1.getValue(), var3);
  256.       } else {
  257.          if (var2.equals("KumaBicycleMove")) {
  258.             this.KumaBicycleMove((ConstSFTime)var1.getValue(), var3);
  259.          }
  260.  
  261.       }
  262.    }
  263.  
  264.    void world_constructor(double var1) {
  265.       this.GondolaRot[0] = (SFRotation)((Script)this).getEventOut("Gondola0_rotation");
  266.       this.GondolaRot[1] = (SFRotation)((Script)this).getEventOut("Gondola1_rotation");
  267.       this.GondolaRot[2] = (SFRotation)((Script)this).getEventOut("Gondola2_rotation");
  268.       this.GondolaRot[3] = (SFRotation)((Script)this).getEventOut("Gondola3_rotation");
  269.       this.GondolaRot[4] = (SFRotation)((Script)this).getEventOut("Gondola4_rotation");
  270.       this.GondolaRot[5] = (SFRotation)((Script)this).getEventOut("Gondola5_rotation");
  271.       this.GondolaRot[6] = (SFRotation)((Script)this).getEventOut("Gondola6_rotation");
  272.       this.GondolaRot[7] = (SFRotation)((Script)this).getEventOut("Gondola7_rotation");
  273.       this.GondolaPos[0] = (SFVec3f)((Script)this).getEventOut("Gondola0_position");
  274.       this.GondolaPos[1] = (SFVec3f)((Script)this).getEventOut("Gondola1_position");
  275.       this.GondolaPos[2] = (SFVec3f)((Script)this).getEventOut("Gondola2_position");
  276.       this.GondolaPos[3] = (SFVec3f)((Script)this).getEventOut("Gondola3_position");
  277.       this.GondolaPos[4] = (SFVec3f)((Script)this).getEventOut("Gondola4_position");
  278.       this.GondolaPos[5] = (SFVec3f)((Script)this).getEventOut("Gondola5_position");
  279.       this.GondolaPos[6] = (SFVec3f)((Script)this).getEventOut("Gondola6_position");
  280.       this.GondolaPos[7] = (SFVec3f)((Script)this).getEventOut("Gondola7_position");
  281.       this.ShapePosInit();
  282.       if (!Vscp.amIMaster()) {
  283.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "WorldSync", "dummy", 2);
  284.       }
  285.  
  286.    }
  287.  
  288.    public void WorldSync(ConstSFString var1, double var2) {
  289.       if (Vscp.amIMaster()) {
  290.          String var4 = String.valueOf(this.FerrisRotateAngle);
  291.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "ShareFerrisRotate", var4, 4);
  292.          var4 = String.valueOf(this.RidePerson);
  293.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "ShareRidePerson", var4, 4);
  294.          var4 = String.valueOf(this.CurrentTime);
  295.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "ShareCurrentTime", var4, 4);
  296.       }
  297.  
  298.    }
  299.  
  300.    public void ShareFerrisRotate(ConstSFString var1, double var2) {
  301.       String var4 = var1.getValue();
  302.       this.FerrisRotateAngle = Float.valueOf(var4);
  303.       this.FerrisMove(var2);
  304.    }
  305.  
  306.    public void ShareRidePerson(ConstSFString var1, double var2) {
  307.       String var4 = var1.getValue();
  308.       this.RidePerson = Integer.valueOf(var4);
  309.    }
  310.  
  311.    public void ShareCurrentTime(ConstSFString var1, double var2) {
  312.       String var4 = var1.getValue();
  313.       this.CurrentTime = Integer.valueOf(var4);
  314.    }
  315.  
  316.    public void WorldMove(ConstSFTime var1, double var2) {
  317.       if (!this.WorldConstructorInvoked) {
  318.          this.WorldTimer.setValue(false);
  319.          this.world_constructor(var2);
  320.          this.WorldConstructorInvoked = true;
  321.          this.WorldTimer.setValue(true);
  322.       }
  323.  
  324.       this.FerrisRideColor();
  325.       if ((this.CurrentTime & 1) == 0) {
  326.          this.FerrisMove(var2);
  327.       }
  328.  
  329.       if ((this.CurrentTime & 3) == 2) {
  330.          this.AirshipMove(var1, var2);
  331.          if (Vscp.amIMaster()) {
  332.             Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "WorldSync", "dummy", 2);
  333.          }
  334.       }
  335.  
  336.       if (this.EclipseCnt > 0) {
  337.          --this.EclipseCnt;
  338.          if (this.EclipseCnt <= 0) {
  339.             this.EclipseReset();
  340.          }
  341.       } else {
  342.          this.ChangeBgColor(var1, var2);
  343.       }
  344.  
  345.       if (this.CurrentTime == 90) {
  346.          this.WorldLightSwitch.setValue(0);
  347.       } else if (this.CurrentTime == 270) {
  348.          this.WorldLightSwitch.setValue(1);
  349.          this.ParadeInit(var2);
  350.          this.ParadeFlg = 1;
  351.       }
  352.  
  353.       if (this.ParadeFlg == 1) {
  354.          if (this.CurrentTime > 270 && this.CurrentTime < 330) {
  355.             this.ParadeMove(var1, var2);
  356.          } else if (this.CurrentTime == 330) {
  357.             this.ParadeEnd(var2);
  358.             this.ParadeFlg = 0;
  359.          }
  360.       } else {
  361.          if (this.Piero1MoveFlg) {
  362.             this.Piero1Move();
  363.          }
  364.  
  365.          if (this.Piero2MoveFlg) {
  366.             this.Piero2Move();
  367.          }
  368.       }
  369.  
  370.       ++this.CurrentTime;
  371.       if (this.CurrentTime >= 360) {
  372.          this.CurrentTime = 0;
  373.          if (Vscp.amIMaster()) {
  374.             Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "WorldSync", "dummy", 2);
  375.          }
  376.       }
  377.  
  378.    }
  379.  
  380.    void FerrisRideColor() {
  381.       float[] var1 = new float[3];
  382.       if (this.FerrisRideColorSw) {
  383.          var1[field_3] = 1.0F;
  384.          var1[field_4] = 0.0F;
  385.          var1[field_5] = 0.0F;
  386.          this.FerrisRideColorSw = false;
  387.       } else {
  388.          var1[field_3] = 0.0F;
  389.          var1[field_4] = 1.0F;
  390.          var1[field_5] = 0.0F;
  391.          this.FerrisRideColorSw = true;
  392.       }
  393.  
  394.       this.FerrisRideCol.setValue(var1);
  395.    }
  396.  
  397.    public void EclipsePick(ConstSFBool var1, double var2) {
  398.       if (!var1.getValue()) {
  399.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "EclipsePickShare", "", 2);
  400.          this.EclipseStart();
  401.       }
  402.    }
  403.  
  404.    public void EclipsePickShare(ConstSFString var1, double var2) {
  405.       if (Vscp.amIMaster()) {
  406.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "EclipsePickShare", "", 4);
  407.       }
  408.  
  409.       this.EclipseStart();
  410.    }
  411.  
  412.    public void EclipseStart() {
  413.       float[][] var1 = new float[1][3];
  414.       var1[0][field_3] = 0.0F;
  415.       var1[0][field_4] = 0.0F;
  416.       var1[0][field_5] = 0.0F;
  417.       this.WorldSkyCol.setValue(var1);
  418.       this.EclipseCnt = 10;
  419.    }
  420.  
  421.    public void EclipseReset() {
  422.       if (this.CurrentTime >= 90 && this.CurrentTime < 270) {
  423.          this.WorldLightSwitch.setValue(0);
  424.       } else {
  425.          this.WorldLightSwitch.setValue(1);
  426.       }
  427.  
  428.       this.EclipseCnt = 0;
  429.    }
  430.  
  431.    public void ChangeBgColor(ConstSFTime var1, double var2) {
  432.       float[][] var7 = new float[1][3];
  433.       float var4;
  434.       float var5;
  435.       float var6;
  436.       if (this.CurrentTime < this.sunriseStartTime) {
  437.          ++this.WorldSkyFlg;
  438.          var4 = this.nightColorR;
  439.          var5 = this.nightColorG;
  440.          var6 = this.nightColorB;
  441.       } else if (this.CurrentTime < this.sunriseMidStartTime) {
  442.          this.WorldSkyFlg = 0;
  443.          var4 = this.calcColorElm(this.CurrentTime, this.sunriseStartTime, this.sunriseMidStartTime, this.nightColorR, this.sunriseColorR);
  444.          var5 = this.calcColorElm(this.CurrentTime, this.sunriseStartTime, this.sunriseMidStartTime, this.nightColorG, this.sunriseColorG);
  445.          var6 = this.calcColorElm(this.CurrentTime, this.sunriseStartTime, this.sunriseMidStartTime, this.nightColorB, this.sunriseColorB);
  446.       } else if (this.CurrentTime < this.sunriseMidEndTime) {
  447.          ++this.WorldSkyFlg;
  448.          var4 = this.sunriseColorR;
  449.          var5 = this.sunriseColorG;
  450.          var6 = this.sunriseColorB;
  451.       } else if (this.CurrentTime < this.sunriseEndTime) {
  452.          this.WorldSkyFlg = 0;
  453.          var4 = this.calcColorElm(this.CurrentTime, this.sunriseMidEndTime, this.sunriseEndTime, this.sunriseColorR, this.daylightColorR);
  454.          var5 = this.calcColorElm(this.CurrentTime, this.sunriseMidEndTime, this.sunriseEndTime, this.sunriseColorG, this.daylightColorG);
  455.          var6 = this.calcColorElm(this.CurrentTime, this.sunriseMidEndTime, this.sunriseEndTime, this.sunriseColorB, this.daylightColorB);
  456.       } else if (this.CurrentTime < this.sunsetStartTime) {
  457.          ++this.WorldSkyFlg;
  458.          var4 = this.daylightColorR;
  459.          var5 = this.daylightColorG;
  460.          var6 = this.daylightColorB;
  461.       } else if (this.CurrentTime < this.sunsetMidStartTime) {
  462.          this.WorldSkyFlg = 0;
  463.          var4 = this.calcColorElm(this.CurrentTime, this.sunsetStartTime, this.sunsetMidStartTime, this.daylightColorR, this.sunsetColorR);
  464.          var5 = this.calcColorElm(this.CurrentTime, this.sunsetStartTime, this.sunsetMidStartTime, this.daylightColorG, this.sunsetColorG);
  465.          var6 = this.calcColorElm(this.CurrentTime, this.sunsetStartTime, this.sunsetMidStartTime, this.daylightColorB, this.sunsetColorB);
  466.       } else if (this.CurrentTime < this.sunsetMidEndTime) {
  467.          ++this.WorldSkyFlg;
  468.          var4 = this.sunsetColorR;
  469.          var5 = this.sunsetColorG;
  470.          var6 = this.sunsetColorB;
  471.       } else if (this.CurrentTime < this.sunsetEndTime) {
  472.          this.WorldSkyFlg = 0;
  473.          var4 = this.calcColorElm(this.CurrentTime, this.sunsetMidEndTime, this.sunsetEndTime, this.sunsetColorR, this.nightColorR);
  474.          var5 = this.calcColorElm(this.CurrentTime, this.sunsetMidEndTime, this.sunsetEndTime, this.sunsetColorG, this.nightColorG);
  475.          var6 = this.calcColorElm(this.CurrentTime, this.sunsetMidEndTime, this.sunsetEndTime, this.sunsetColorB, this.nightColorB);
  476.       } else {
  477.          ++this.WorldSkyFlg;
  478.          var4 = this.nightColorR;
  479.          var5 = this.nightColorG;
  480.          var6 = this.nightColorB;
  481.       }
  482.  
  483.       if (this.WorldSkyFlg <= 1) {
  484.          var7[0][field_3] = var4;
  485.          var7[0][field_4] = var5;
  486.          var7[0][field_5] = var6;
  487.          this.WorldSkyCol.setValue(var7);
  488.       } else {
  489.          this.WorldSkyFlg = 2;
  490.       }
  491.    }
  492.  
  493.    public float calcColorElm(int var1, int var2, int var3, float var4, float var5) {
  494.       float var6 = (var4 * (float)(var3 - var1) + var5 * (float)(var1 - var2)) / (float)(var3 - var2);
  495.       return var6;
  496.    }
  497.  
  498.    public void ParadeInit(double var1) {
  499.       float[] var3 = new float[3];
  500.       float[] var4 = new float[4];
  501.       double var9 = (double)60.0F;
  502.       var3[field_0] = 15.0F;
  503.       var3[field_1] = 2.5F;
  504.       var3[field_2] = 0.0F;
  505.       this.ParadeSoundPos.setValue(var3);
  506.       var3[field_0] = 13.0F;
  507.       var3[field_1] = 2.5F;
  508.       var3[field_2] = 4.0F;
  509.       this.Piero1Pos.setValue(var3);
  510.       var3[field_0] = 13.0F;
  511.       var3[field_1] = 2.5F;
  512.       var3[field_2] = 4.0F;
  513.       this.AccordionPos.setValue(var3);
  514.       var3[field_0] = 14.3F;
  515.       var3[field_1] = 2.9F;
  516.       var3[field_2] = 2.0F;
  517.       this.Piero2Pos.setValue(var3);
  518.       var3[field_0] = 14.3F;
  519.       var3[field_1] = 2.7F;
  520.       var3[field_2] = 2.0F;
  521.       this.BarrelPos.setValue(var3);
  522.       var3[field_0] = 15.0F;
  523.       var3[field_1] = 2.5F;
  524.       var3[field_2] = 0.0F;
  525.       this.Piero3Pos.setValue(var3);
  526.       var3[field_0] = 14.3F;
  527.       var3[field_1] = 2.0F;
  528.       var3[field_2] = -2.0F;
  529.       this.AshikaPos.setValue(var3);
  530.       var3[field_0] = 13.0F;
  531.       var3[field_1] = 2.5F;
  532.       var3[field_2] = -4.0F;
  533.       this.KumaPos.setValue(var3);
  534.       var4[field_0] = 0.0F;
  535.       var4[field_1] = 1.0F;
  536.       var4[field_2] = 0.0F;
  537.       var4[DEGREE] = -20.0F / this.Radian;
  538.       this.Piero1Rot.setValue(var4);
  539.       this.AccordionRot.setValue(var4);
  540.       var4[DEGREE] = -10.0F / this.Radian;
  541.       this.Piero2Rot.setValue(var4);
  542.       this.BarrelRot.setValue(var4);
  543.       var4[DEGREE] = 0.0F / this.Radian;
  544.       this.Piero3Rot.setValue(var4);
  545.       var4[DEGREE] = 10.0F / this.Radian;
  546.       this.AshikaRot.setValue(var4);
  547.       var4[DEGREE] = 25.0F / this.Radian;
  548.       this.KumaRot.setValue(var4);
  549.       double var5 = var1 + (double)1.0F;
  550.       double var7 = var5 + var9;
  551.       this.Piero1StartTime.setValue(var5);
  552.       this.Piero1StopTime.setValue(var7);
  553.       this.Piero2StartTime.setValue(var5);
  554.       this.Piero2StopTime.setValue(var7);
  555.       this.Piero3StartTime.setValue(var5);
  556.       this.Piero3StopTime.setValue(var7);
  557.       this.AshikaStartTime.setValue(var5);
  558.       this.AshikaStopTime.setValue(var7);
  559.       this.KumaStartTime.setValue(var5);
  560.       this.KumaStopTime.setValue(var7);
  561.       this.Piero1Sw.setValue(true);
  562.       this.Piero2Sw.setValue(true);
  563.       this.Piero3Sw.setValue(true);
  564.       this.AshikaSw.setValue(true);
  565.       this.KumaSw.setValue(true);
  566.       this.ParadeSound_start.setValue(var1);
  567.    }
  568.  
  569.    public void ParadeMove(ConstSFTime var1, double var2) {
  570.       float[] var4 = new float[4];
  571.       var4[field_0] = 0.0F;
  572.       var4[field_1] = 1.0F;
  573.       var4[field_2] = 0.0F;
  574.       var4[DEGREE] = (float)(this.CurrentTime - 270) * -6.0F / this.Radian;
  575.       this.ParadeStageRot.setValue(var4);
  576.       var4[field_0] = 1.0F;
  577.       var4[field_1] = 0.0F;
  578.       var4[field_2] = 0.0F;
  579.       var4[DEGREE] = 15.0F / this.Radian;
  580.       this.BarrelRot.setValue(var4);
  581.    }
  582.  
  583.    public void ParadeEnd(double var1) {
  584.       float[] var3 = new float[4];
  585.       var3[field_0] = 0.0F;
  586.       var3[field_1] = 1.0F;
  587.       var3[field_2] = 0.0F;
  588.       var3[DEGREE] = 0.0F / this.Radian;
  589.       this.ParadeStageRot.setValue(var3);
  590.       this.Piero1Rot.setValue(var3);
  591.       this.AccordionRot.setValue(var3);
  592.       var3[DEGREE] = -10.0F / this.Radian;
  593.       this.Piero2Rot.setValue(var3);
  594.       this.BarrelRot.setValue(var3);
  595.       var3[DEGREE] = -20.0F / this.Radian;
  596.       this.Piero3Rot.setValue(var3);
  597.       var3[DEGREE] = 0.0F / this.Radian;
  598.       this.AshikaRot.setValue(var3);
  599.       var3[DEGREE] = 0.0F / this.Radian;
  600.       this.KumaRot.setValue(var3);
  601.       this.InterpolatorPosInit();
  602.       this.ParadeSound_stop.setValue(var1);
  603.    }
  604.  
  605.    public void PeriodicIllumi(ConstSFTime var1, ConstSFTime var2) {
  606.       ++this.IllumiNo;
  607.       if (this.IllumiNo > 9) {
  608.          this.IllumiNo = 0;
  609.          ++this.IllumiCnt;
  610.          if (this.IllumiCnt > 3) {
  611.             this.IllumiCnt = 0;
  612.          }
  613.  
  614.          if (this.IllumiCnt == 0) {
  615.             this.IllumiR = 0.0F;
  616.             this.IllumiG = 0.0F;
  617.             this.IllumiB = 0.0F;
  618.             return;
  619.          }
  620.  
  621.          if (this.IllumiCnt == 1) {
  622.             this.IllumiR = 1.0F;
  623.             this.IllumiG = 1.0F;
  624.             this.IllumiB = 1.0F;
  625.             return;
  626.          }
  627.  
  628.          if (this.IllumiCnt == 2) {
  629.             this.IllumiR = 1.0F;
  630.             this.IllumiG = 0.0F;
  631.             this.IllumiB = 0.0F;
  632.             return;
  633.          }
  634.  
  635.          if (this.IllumiCnt == 3) {
  636.             this.IllumiR = 0.3F;
  637.             this.IllumiG = 1.0F;
  638.             this.IllumiB = 0.1F;
  639.          }
  640.       }
  641.  
  642.    }
  643.  
  644.    public void AirshipMove(ConstSFTime var1, double var2) {
  645.       float[] var4 = new float[4];
  646.       var4[field_0] = 0.0F;
  647.       var4[field_1] = 1.0F;
  648.       var4[field_2] = 0.0F;
  649.       var4[DEGREE] = (float)this.CurrentTime / this.Radian;
  650.       this.AirShipRot.setValue(var4);
  651.    }
  652.  
  653.    public void InterpolatorPosInit() {
  654.       float[] var1 = new float[3];
  655.       this.Piero1PosInit();
  656.       this.Piero2PosInit();
  657.       this.Piero3PosInit();
  658.       this.AshikaPosInit();
  659.       this.KumaPosInit();
  660.       var1[field_0] = 10.0F;
  661.       var1[field_1] = 2.5F;
  662.       var1[field_2] = 10.0F;
  663.       this.AccordionPos.setValue(var1);
  664.       this.Piero2Dir = 0;
  665.    }
  666.  
  667.    public void ShapePosInit() {
  668.       float[] var2 = new float[3];
  669.       var2[field_0] = 0.0F;
  670.       var2[field_1] = 28.5F;
  671.       var2[field_2] = 0.0F;
  672.       this.FerrisWheelPos.setValue(var2);
  673.  
  674.       for(int var1 = 0; var1 <= 7; ++var1) {
  675.          float var3 = (float)var1 / 8.0F * 360.0F + 90.0F;
  676.          float var4 = var3 / this.Radian;
  677.          var2[field_0] = (float)Math.cos((double)var4) * this.FerrisWheelR;
  678.          var2[field_1] = (float)Math.sin((double)var4) * this.FerrisWheelR;
  679.          var2[field_2] = 0.0F;
  680.          this.GondolaPos[var1].setValue(var2);
  681.       }
  682.  
  683.       var2[field_0] = 0.0F;
  684.       var2[field_1] = 3.5F;
  685.       var2[field_2] = 3.0F;
  686.       this.FerrisRidePos.setValue(var2);
  687.       this.FerrisExitPosInit();
  688.       this.InterpolatorPosInit();
  689.    }
  690.  
  691.    float RotateToAngle(float var1) {
  692.       float var2 = var1 / 72.0F * 360.0F;
  693.       return var2;
  694.    }
  695.  
  696.    public void FerrisMove(double var1) {
  697.       float[] var9 = new float[3];
  698.       float[] var10 = new float[4];
  699.       ++this.FerrisRotateAngle;
  700.       if (this.FerrisRotateAngle >= 72.0F) {
  701.          this.FerrisRotateAngle = 0.0F;
  702.       }
  703.  
  704.       float var11 = this.FerrisRotateAngle;
  705.       int var4 = (int)(var11 % 9.0F);
  706.       if (var4 == 0) {
  707.          this.RidePerson = 0;
  708.       }
  709.  
  710.       float var13 = this.RotateToAngle(var11);
  711.       float var14 = var13 / this.Radian;
  712.       var10[field_0] = 0.0F;
  713.       var10[field_1] = 0.0F;
  714.       var10[field_2] = 1.0F;
  715.       var10[DEGREE] = -var14;
  716.       this.FerrisWheelRot.setValue(var10);
  717.       var10[field_0] = 0.0F;
  718.       var10[field_1] = 0.0F;
  719.       var10[field_2] = 1.0F;
  720.       var10[DEGREE] = var14;
  721.  
  722.       for(int var5 = 0; var5 <= 7; ++var5) {
  723.          this.GondolaRot[var5].setValue(var10);
  724.       }
  725.  
  726.       if (this.RideGondolaNum > 0) {
  727.          int var3 = this.RideGondolaNum - 1;
  728.          float var12 = (float)var3 * 9.0F;
  729.          if (var11 == var12) {
  730.             this.FerrisExitReset(var1);
  731.             return;
  732.          }
  733.  
  734.          var13 = this.RotateToAngle(var11 - var12) + 90.0F;
  735.          var14 = var13 / this.Radian;
  736.          float var6 = (float)Math.cos((double)(-var14)) * this.FerrisWheelR;
  737.          float var7 = (float)Math.sin((double)(-var14)) * this.FerrisWheelR + this.FerrisWheelY;
  738.          float var8 = 0.0F;
  739.          if (this.RideSeat == 1) {
  740.             var9[field_0] = var6;
  741.             var9[field_1] = var7 - 0.4F;
  742.             var9[field_2] = var8 - 1.5F;
  743.             this.FerrisExitPos.setValue(var9);
  744.             var9[field_0] = var6;
  745.             var9[field_1] = var7 - 2.5F;
  746.             var9[field_2] = var8 + 1.0F;
  747.             this.GondolaFloorPos.setValue(var9);
  748.             var9[field_0] = 0.0F;
  749.             var9[field_1] = 0.7F;
  750.             var9[field_2] = 0.0F;
  751.             this.GondolaFencePos.setValue(var9);
  752.             return;
  753.          }
  754.  
  755.          var9[field_0] = var6;
  756.          var9[field_1] = var7 - 0.4F;
  757.          var9[field_2] = var8 + 1.5F;
  758.          this.FerrisExitPos.setValue(var9);
  759.          var9[field_0] = var6;
  760.          var9[field_1] = var7 - 2.5F;
  761.          var9[field_2] = var8 - 1.0F;
  762.          this.GondolaFloorPos.setValue(var9);
  763.          var9[field_0] = 0.0F;
  764.          var9[field_1] = 0.7F;
  765.          var9[field_2] = 0.0F;
  766.          this.GondolaFencePos.setValue(var9);
  767.       }
  768.  
  769.    }
  770.  
  771.    public void FerrisRidePick(ConstSFBool var1, double var2) {
  772.       float[] var6 = new float[4];
  773.       if (!var1.getValue()) {
  774.          if (this.RideGondolaNum <= 0) {
  775.             if (this.RidePerson < 2) {
  776.                float var5 = this.FerrisRotateAngle;
  777.                int var4 = (int)(var5 / 9.0F);
  778.                this.RideGondolaNum = var4 + 1;
  779.                this.GondolaSound_start.setValue(var2);
  780.                this.GondolaSound_stop.setValue((double)-1.0F);
  781.                if (this.RidePerson == 0) {
  782.                   this.RideSeat = 1;
  783.                   this.RidePerson = 1;
  784.                   var6[field_0] = 0.0F;
  785.                   var6[field_1] = 1.0F;
  786.                   var6[field_2] = 0.0F;
  787.                   var6[DEGREE] = 0.0F;
  788.                } else {
  789.                   this.RideSeat = 2;
  790.                   this.RidePerson = 2;
  791.                   var6[field_0] = 0.0F;
  792.                   var6[field_1] = 1.0F;
  793.                   var6[field_2] = 0.0F;
  794.                   var6[DEGREE] = 180.0F / this.Radian;
  795.                }
  796.  
  797.                this.GondolaViewBind.setValue(true);
  798.                String var7 = String.valueOf(this.RideSeat);
  799.                Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "FerrisRide", var7, 2);
  800.             }
  801.          }
  802.       }
  803.    }
  804.  
  805.    public void FerrisRide(ConstSFString var1, double var2) {
  806.       if (Vscp.amIMaster()) {
  807.          String var4 = var1.getValue();
  808.          this.RidePerson = Integer.valueOf(var4);
  809.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "ShareRidePerson", var4, 4);
  810.       }
  811.  
  812.    }
  813.  
  814.    public void FerrisExitPosInit() {
  815.       float[] var1 = new float[3];
  816.       var1[field_0] = 0.0F;
  817.       var1[field_1] = 0.0F;
  818.       var1[field_2] = 0.0F;
  819.       this.FerrisExitPos.setValue(var1);
  820.       var1[field_0] = 0.0F;
  821.       var1[field_1] = 3.5F;
  822.       var1[field_2] = -2.5F;
  823.       this.GondolaFloorPos.setValue(var1);
  824.       var1[field_0] = 0.0F;
  825.       var1[field_1] = -1.0F;
  826.       var1[field_2] = 0.0F;
  827.       this.GondolaFencePos.setValue(var1);
  828.    }
  829.  
  830.    public void FerrisExitReset(double var1) {
  831.       this.RideGondolaNum = 0;
  832.       this.RideSeat = 0;
  833.       this.FerrisExitPosInit();
  834.       this.GondolaSound_stop.setValue(var1);
  835.    }
  836.  
  837.    public void FerrisExitPick(ConstSFBool var1, double var2) {
  838.       if (!var1.getValue()) {
  839.          this.FerrisExitReset(var2);
  840.       }
  841.    }
  842.  
  843.    public void Piero1PosInit() {
  844.       float[] var1 = new float[3];
  845.       var1[field_0] = 10.0F;
  846.       var1[field_1] = 2.5F;
  847.       var1[field_2] = 10.0F;
  848.       this.Piero1Pos.setValue(var1);
  849.    }
  850.  
  851.    public void Piero1Pick(ConstSFBool var1, double var2) {
  852.       if (!var1.getValue()) {
  853.          this.Piero1Start(var2);
  854.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "Piero1PickShare", "void", 4);
  855.       }
  856.    }
  857.  
  858.    public void Piero1PickShare(ConstSFString var1, double var2) {
  859.       this.Piero1Start(var2);
  860.    }
  861.  
  862.    public void Piero1Start(double var1) {
  863.       this.Piero1StartTime.setValue(var1);
  864.       double var3 = var1 + (double)8.0F;
  865.       this.Piero1StopTime.setValue(var3);
  866.       this.Piero1MoveFlg = true;
  867.       this.Piero1Sw.setValue(true);
  868.    }
  869.  
  870.    public void Piero1Move() {
  871.       float[] var1 = new float[3];
  872.       if (this.Piero1Cnt >= 8) {
  873.          this.Piero1Sw.setValue(false);
  874.          this.Piero1MoveFlg = false;
  875.          this.Piero1Cnt = 0;
  876.       } else {
  877.          var1[field_0] = 0.0F;
  878.          var1[field_1] = 0.0F;
  879.          var1[field_2] = 0.0F;
  880.          if ((this.Piero1Cnt & 1) == 0) {
  881.             var1[field_0] = 0.03F;
  882.             this.Accordion1Pos.setValue(var1);
  883.             var1[field_0] = -0.03F;
  884.             this.Accordion2Pos.setValue(var1);
  885.          } else {
  886.             var1[field_0] = -0.03F;
  887.             this.Accordion1Pos.setValue(var1);
  888.             var1[field_0] = 0.03F;
  889.             this.Accordion2Pos.setValue(var1);
  890.          }
  891.  
  892.          ++this.Piero1Cnt;
  893.       }
  894.    }
  895.  
  896.    public void Piero2PosInit() {
  897.       float[] var1 = new float[3];
  898.       var1[field_0] = -10.0F;
  899.       var1[field_1] = 2.9F;
  900.       var1[field_2] = 5.0F;
  901.       this.Piero2Pos.setValue(var1);
  902.       var1[field_0] = -10.0F;
  903.       var1[field_1] = 2.7F;
  904.       var1[field_2] = 5.0F;
  905.       this.BarrelPos.setValue(var1);
  906.       this.Piero2PosZ = 0.0F;
  907.    }
  908.  
  909.    public void Piero2Pick(ConstSFBool var1, double var2) {
  910.       if (!var1.getValue()) {
  911.          this.Piero2Start(var2);
  912.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "Piero2PickShare", "void", 4);
  913.       }
  914.    }
  915.  
  916.    public void Piero2PickShare(ConstSFString var1, double var2) {
  917.       this.Piero2Start(var2);
  918.    }
  919.  
  920.    public void Piero2Start(double var1) {
  921.       this.Piero2StartTime.setValue(var1);
  922.       double var3 = var1 + (double)4.0F;
  923.       this.Piero2StopTime.setValue(var3);
  924.       this.Piero2Sw.setValue(true);
  925.       this.Piero2MoveFlg = true;
  926.    }
  927.  
  928.    public void Piero2Move() {
  929.       float[] var1 = new float[3];
  930.       float[] var2 = new float[4];
  931.       if (this.Piero2Cnt >= 8) {
  932.          this.Piero2Cnt = 0;
  933.          if (this.Piero2Dir == 0) {
  934.             this.Piero2Dir = 1;
  935.          } else {
  936.             this.Piero2Dir = 0;
  937.          }
  938.  
  939.          this.Piero2MoveFlg = false;
  940.       } else {
  941.          if (this.Piero2Dir == 0) {
  942.             this.Piero2PosZ += 0.1F;
  943.             this.Piero2RotD += 15.0F;
  944.          } else {
  945.             this.Piero2PosZ -= 0.1F;
  946.             this.Piero2RotD -= 15.0F;
  947.          }
  948.  
  949.          var1[field_0] = -10.0F;
  950.          var1[field_1] = 2.9F;
  951.          var1[field_2] = 5.0F + this.Piero2PosZ;
  952.          this.Piero2Pos.setValue(var1);
  953.          var1[field_0] = -10.0F;
  954.          var1[field_1] = 2.7F;
  955.          var1[field_2] = 5.0F + this.Piero2PosZ;
  956.          this.BarrelPos.setValue(var1);
  957.          var2[field_0] = 1.0F;
  958.          var2[field_1] = 0.0F;
  959.          var2[field_2] = 0.0F;
  960.          var2[DEGREE] = this.Piero2RotD / this.Radian;
  961.          this.BarrelRot.setValue(var2);
  962.          ++this.Piero2Cnt;
  963.       }
  964.    }
  965.  
  966.    public void Piero3PosInit() {
  967.       float[] var1 = new float[3];
  968.       var1[field_0] = -3.0F;
  969.       var1[field_1] = 0.8F;
  970.       var1[field_2] = -40.0F;
  971.       this.Piero3Pos.setValue(var1);
  972.    }
  973.  
  974.    public void Piero3Pick(ConstSFBool var1, double var2) {
  975.       if (!var1.getValue()) {
  976.          this.Piero3Start(var2);
  977.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "Piero3PickShare", "void", 4);
  978.       }
  979.    }
  980.  
  981.    public void Piero3PickShare(ConstSFString var1, double var2) {
  982.       this.Piero3Start(var2);
  983.    }
  984.  
  985.    public void Piero3Start(double var1) {
  986.       this.Piero3StartTime.setValue(var1);
  987.       double var3 = var1 + (double)4.0F;
  988.       this.Piero3StopTime.setValue(var3);
  989.       this.Piero3Sw.setValue(true);
  990.    }
  991.  
  992.    public void KumaPosInit() {
  993.       float[] var1 = new float[3];
  994.       var1[field_0] = -30.0F;
  995.       var1[field_1] = 0.2F;
  996.       var1[field_2] = -30.0F;
  997.       this.KumaPos.setValue(var1);
  998.    }
  999.  
  1000.    public void KumaPick(ConstSFBool var1, double var2) {
  1001.       if (!var1.getValue()) {
  1002.          this.KumaStart(var2);
  1003.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "KumaPickShare", "void", 4);
  1004.       }
  1005.    }
  1006.  
  1007.    public void KumaPickShare(ConstSFString var1, double var2) {
  1008.       this.KumaStart(var2);
  1009.    }
  1010.  
  1011.    public void KumaStart(double var1) {
  1012.       if (this.ParadeFlg != 1) {
  1013.          if (this.KumaCnt > 0) {
  1014.             return;
  1015.          }
  1016.  
  1017.          this.KumaAng = 0.0F;
  1018.          this.KumaCnt = 0;
  1019.          this.KumaStartTime.setValue(var1);
  1020.          double var3 = var1 + (double)20.0F;
  1021.          this.KumaStopTime.setValue(var3);
  1022.          this.KumaSw.setValue(true);
  1023.          this.KumaBicycleSw.setValue(true);
  1024.       }
  1025.  
  1026.    }
  1027.  
  1028.    public void KumaBicycleMove(ConstSFTime var1, double var2) {
  1029.       float[] var4 = new float[3];
  1030.       float[] var5 = new float[4];
  1031.       float var7 = -30.0F;
  1032.       float var8 = 0.2F;
  1033.       float var9 = -30.0F;
  1034.       float var10 = 1.5F;
  1035.       if (this.ParadeFlg != 1) {
  1036.          if (this.KumaCnt < 18) {
  1037.             this.KumaAng += 20.0F;
  1038.             float var6 = this.KumaAng / this.Radian;
  1039.             var4[field_0] = (float)Math.cos((double)var6) * var10 + var7 - var10;
  1040.             var4[field_2] = (float)Math.sin((double)var6) * var10 + var9;
  1041.             var4[field_1] = var8;
  1042.          } else if (this.KumaCnt < 36) {
  1043.             this.KumaAng -= 20.0F;
  1044.             float var11 = (this.KumaAng + 180.0F) / this.Radian;
  1045.             var4[field_0] = (float)Math.cos((double)var11) * var10 + var7 + var10;
  1046.             var4[field_2] = (float)Math.sin((double)var11) * var10 + var9;
  1047.             var4[field_1] = var8;
  1048.          } else {
  1049.             this.KumaAng = 0.0F;
  1050.             this.KumaCnt = -1;
  1051.             var4[field_0] = var7;
  1052.             var4[field_2] = var9;
  1053.             var4[field_1] = var8;
  1054.             this.KumaBicycleSw.setValue(false);
  1055.          }
  1056.  
  1057.          var5[field_0] = 0.0F;
  1058.          var5[field_1] = 1.0F;
  1059.          var5[field_2] = 0.0F;
  1060.          var5[DEGREE] = -this.KumaAng / this.Radian;
  1061.          this.KumaRot.setValue(var5);
  1062.          this.KumaPos.setValue(var4);
  1063.          ++this.KumaCnt;
  1064.       }
  1065.  
  1066.    }
  1067.  
  1068.    public void AshikaPosInit() {
  1069.       float[] var1 = new float[3];
  1070.       var1[field_0] = -60.0F;
  1071.       var1[field_1] = 0.0F;
  1072.       var1[field_2] = 35.0F;
  1073.       this.AshikaPos.setValue(var1);
  1074.    }
  1075.  
  1076.    public void AshikaPick(ConstSFBool var1, double var2) {
  1077.       if (!var1.getValue()) {
  1078.          this.AshikaStart(var2);
  1079.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "AshikaPickShare", "void", 4);
  1080.       }
  1081.    }
  1082.  
  1083.    public void AshikaPickShare(ConstSFString var1, double var2) {
  1084.       this.AshikaStart(var2);
  1085.    }
  1086.  
  1087.    public void AshikaStart(double var1) {
  1088.       this.AshikaStartTime.setValue(var1);
  1089.       double var3 = var1 + (double)1.0F;
  1090.       this.AshikaStopTime.setValue(var3);
  1091.       this.AshikaSw.setValue(true);
  1092.    }
  1093.  
  1094.    public void AshikaBallPick(ConstSFBool var1, double var2) {
  1095.       if (!var1.getValue()) {
  1096.          Vscp.sendApplSpecificMsgWithDist(this.WorldNode, "AshikaBallPickShare", "void", 4);
  1097.          this.AshikaBallStart(var2);
  1098.       }
  1099.    }
  1100.  
  1101.    public void AshikaBallPickShare(ConstSFString var1, double var2) {
  1102.       this.AshikaBallStart(var2);
  1103.    }
  1104.  
  1105.    public void AshikaBallStart(double var1) {
  1106.       if (this.ParadeFlg != 1) {
  1107.          this.AshikaBallSw.setValue(true);
  1108.       }
  1109.  
  1110.    }
  1111.  
  1112.    public void AshikaSound(double var1, boolean var3) {
  1113.       if (var3) {
  1114.          this.AshikaSound_start.setValue(var1);
  1115.       } else {
  1116.          this.AshikaSound_stop.setValue(var1);
  1117.       }
  1118.    }
  1119.  
  1120.    public void AshikaBallMove(ConstSFTime var1, double var2) {
  1121.       float[] var4 = new float[3];
  1122.       float[] var5 = new float[4];
  1123.       this.AshikaBallRotX -= 10.0F;
  1124.       this.AshikaBallRotZ += 20.0F;
  1125.       var5[field_0] = 1.0F;
  1126.       var5[field_1] = 0.0F;
  1127.       var5[field_2] = 0.0F;
  1128.       var5[DEGREE] = this.AshikaBallRotX / this.Radian;
  1129.       this.AshikaBallRot.setValue(var5);
  1130.       var5[field_0] = 0.0F;
  1131.       var5[field_1] = 0.0F;
  1132.       var5[field_2] = 1.0F;
  1133.       var5[DEGREE] = this.AshikaBallRotZ / this.Radian;
  1134.       this.AshikaBallRot.setValue(var5);
  1135.       this.AshikaStart(var2);
  1136.       ++this.AshikaCnt;
  1137.       if (this.AshikaMode == 0) {
  1138.          if (this.AshikaCnt > 10) {
  1139.             this.AshikaCnt = 0;
  1140.             ++this.AshikaMode;
  1141.             this.AshikaSound(var2, true);
  1142.          } else {
  1143.             int var8 = this.AshikaCnt - 1;
  1144.             var4[0] = -60.0F;
  1145.             var4[1] = this.AshikaBallData1[var8][1];
  1146.             var4[2] = this.AshikaBallData1[var8][0];
  1147.             this.AshikaBallPos.setValue(var4);
  1148.          }
  1149.       } else if (this.AshikaMode == 1) {
  1150.          if (this.AshikaCnt > 10) {
  1151.             this.AshikaCnt = 0;
  1152.             ++this.AshikaMode;
  1153.             this.AshikaSound(var2, true);
  1154.             this.AshikaSw.setValue(false);
  1155.          } else {
  1156.             int var7 = this.AshikaCnt - 1;
  1157.             var4[field_0] = -60.0F;
  1158.             var4[field_1] = this.AshikaBallData2[var7];
  1159.             var4[field_2] = 35.7F;
  1160.             this.AshikaBallPos.setValue(var4);
  1161.          }
  1162.       } else {
  1163.          if (this.AshikaMode == 2) {
  1164.             if (this.AshikaCnt == 0) {
  1165.                this.AshikaSound(var2, false);
  1166.                return;
  1167.             }
  1168.  
  1169.             if (this.AshikaCnt > 10) {
  1170.                this.AshikaBallSw.setValue(false);
  1171.                this.AshikaMode = 0;
  1172.                this.AshikaCnt = 0;
  1173.                return;
  1174.             }
  1175.  
  1176.             int var6 = 10 - this.AshikaCnt;
  1177.             var4[field_0] = -60.0F;
  1178.             var4[field_1] = this.AshikaBallData1[var6][1];
  1179.             var4[field_2] = this.AshikaBallData1[var6][0];
  1180.             this.AshikaBallPos.setValue(var4);
  1181.          }
  1182.  
  1183.       }
  1184.    }
  1185. }
  1186.