Звичайна людина на Землі
Регистрация: 06.11.2011
Адрес: Україна, м.Київ, Печерський район, вул. Кіквідзе
Сообщений: 8,085
|
Уже начал делать. Вооружение распишу в обед.
Первая половина класса выглядит так:
Код:
// Source File Name: FW_190A6LULU.java
package com.maddox.il2.objects.air;
import com.maddox.il2.engine.*;
import com.maddox.il2.fm.FlightModel;
import com.maddox.il2.fm.FlightModelMain;
import com.maddox.il2.fm.Controls;
import com.maddox.il2.fm.Turret;
import com.maddox.il2.game.Main3D;
import com.maddox.il2.game.HUD;
import com.maddox.il2.game.AircraftHotKeys;
import com.maddox.il2.objects.sounds.SndAircraft;
import com.maddox.il2.objects.weapons.GunEmpty;
import com.maddox.il2.objects.Wreckage;
import java.util.ArrayList;
import java.io.IOException;
import java.util.Random;
import com.maddox.util.HashMapInt;
import com.maddox.rts.Finger;
import com.maddox.rts.Property;
import com.maddox.rts.*;
// Referenced classes of package com.maddox.il2.objects.air:
// FW_190, TypeFighter, TypeBNZFighter, PaintSchemeFMPar01,
// Aircraft, NetAircraft
public class FW_190A6LULU extends FW_190
implements TypeFighter, TypeBNZFighter
{
public FW_190A6LULU()
{
}
public void onAircraftLoaded()
{
super.onAircraftLoaded();
((FlightModelMain) (super.FM)).AS.wantBeaconsNet(true);
if(getGunByHookName("_MGUN01") instanceof GunEmpty)
{
hierMesh().chunkVisible("7mmC_D0", false);
hierMesh().chunkVisible("7mmCowl_D0", true);
}
if(getGunByHookName("_CANNON01") instanceof GunEmpty)
hierMesh().chunkVisible("20mmL1_D0", false);
if(getGunByHookName("_CANNON02") instanceof GunEmpty)
hierMesh().chunkVisible("20mmR1_D0", false);
if(getGunByHookName("_CANNON03") instanceof GunEmpty)
hierMesh().chunkVisible("20mmL_D0", false);
((FlightModelMain) (super.FM)).M.massEmpty -= 89F;
if(getGunByHookName("_CANNON04") instanceof GunEmpty)
hierMesh().chunkVisible("20mmR_D0", false);
((FlightModelMain) (super.FM)).M.massEmpty -= 89F;
if(!(getGunByHookName("_ExternalDev05") instanceof GunEmpty))
{
hierMesh().chunkVisible("Flap01_D0", false);
hierMesh().chunkVisible("Flap01Holed_D0", true);
}
if(!(getGunByHookName("_ExternalDev06") instanceof GunEmpty))
{
hierMesh().chunkVisible("Flap04_D0", false);
hierMesh().chunkVisible("Flap04Holed_D0", true);
}
if(!(getGunByHookName("_CANNON05") instanceof GunEmpty))
{
hierMesh().chunkVisible("FuG125L_D0", false);
hierMesh().chunkVisible("FuG125R_D0", false);
hierMesh().chunkVisible("FuG1251_D0", false);
hierMesh().chunkVisible("FuG1252_D0", false);
hierMesh().chunkVisible("Deflect_D0", false);
hierMesh().chunkVisible("FuG217L_D0", true);
hierMesh().chunkVisible("FuG217R_D0", true);
((FlightModelMain) (super.FM)).M.massEmpty -= 120F;
}
if(!(getGunByHookName("_CANNON06") instanceof GunEmpty))
{
hierMesh().chunkVisible("FuG125L_D0", false);
hierMesh().chunkVisible("FuG125R_D0", false);
hierMesh().chunkVisible("FuG1251_D0", false);
hierMesh().chunkVisible("FuG1252_D0", false);
hierMesh().chunkVisible("Deflect_D0", false);
hierMesh().chunkVisible("FuG217L_D0", true);
hierMesh().chunkVisible("FuG217R_D0", true);
((FlightModelMain) (super.FM)).M.massEmpty -= 120F;
}
}
protected void moveGear(float f)
{
FW_190.moveGear(hierMesh(), f);
}
public void moveSteering(float f)
{
if(((FlightModelMain) (super.FM)).CT.getGear() < 0.98F)
{
return;
} else
{
hierMesh().chunkSetAngles("GearC2_D0", 0.0F, -f, 0.0F);
return;
}
}
public void update(float f)
{
afterburnerhud();
super.update(f);
}
protected void nextDMGLevel(String s, int i, Actor actor)
{
super.nextDMGLevel(s, i, actor);
if(super.FM.isPlayers())
bChangedPit = true;
}
protected void afterburnerhud()
{
if(super.FM.isPlayers() && ((FlightModelMain) (super.FM)).EI.engines[0].getControlAfterburner())
HUD.logRightBottom(" Erh\366hte Hochtsleistung inbegriffen!");
}
protected void nextCUTLevel(String s, int i, Actor actor)
{
super.nextCUTLevel(s, i, actor);
if(super.FM.isPlayers())
bChangedPit = true;
}
private static Aircraft._WeaponSlot[] GenerateDefaultConfig(int i)
{
Aircraft._WeaponSlot a_lweaponslot[] = new Aircraft._WeaponSlot[i];
try
{
a_lweaponslot[0] = new Aircraft._WeaponSlot(0, "MGunMG17si", 900);
a_lweaponslot[1] = new Aircraft._WeaponSlot(0, "MGunMG17si", 900);
a_lweaponslot[2] = new Aircraft._WeaponSlot(1, "MGunMG15120MGsi", 250);
a_lweaponslot[3] = new Aircraft._WeaponSlot(1, "MGunMG15120MGsi", 250);
a_lweaponslot[4] = new Aircraft._WeaponSlot(1, "MGunMG15120MGs", 140);
a_lweaponslot[5] = new Aircraft._WeaponSlot(1, "MGunMG15120MGs", 140);
a_lweaponslot[6] = null;
a_lweaponslot[7] = null;
a_lweaponslot[8] = null;
a_lweaponslot[9] = null;
a_lweaponslot[10] = null;
a_lweaponslot[11] = null;
a_lweaponslot[12] = null;
a_lweaponslot[13] = null;
a_lweaponslot[14] = null;
a_lweaponslot[15] = null;
a_lweaponslot[16] = null;
a_lweaponslot[17] = null;
a_lweaponslot[18] = null;
a_lweaponslot[19] = null;
a_lweaponslot[20] = null;
a_lweaponslot[21] = null;
a_lweaponslot[22] = null;
a_lweaponslot[23] = null;
a_lweaponslot[24] = null;
a_lweaponslot[25] = null;
a_lweaponslot[26] = null;
a_lweaponslot[27] = null;
}
catch(Exception exception) { }
return a_lweaponslot;
}
static java.lang.Class _mthclass$(java.lang.String s)
{
java.lang.Class class1;
try
{
class1 = java.lang.Class.forName(s);
}
catch(java.lang.ClassNotFoundException classnotfoundexception)
{
throw new NoClassDefFoundError(classnotfoundexception.getMessage());
}
return class1;
}
public static boolean bChangedPit = false;
|