Показать сообщение отдельно
Старый 15.10.2021, 22:04   #413
tvister
Местный
 
Аватар для tvister
 
Регистрация: 26.12.2013
Адрес: Донецьк Україна
Сообщений: 1,848
По умолчанию

Доброго времени суток! Вопрос к знатокам...
Вот класс "Либерти", кораблик с тремя световыми эффектами которые включаются в ночное время суток. Подскажите пожалуйста как добавить еще один эффект, работающий постоянно, не зависимый от времени?
Код:
/* Liberty_cargo_ship - Decompiled by JODE
 * Visit http://jode.sourceforge.net/
 */
package com.maddox.il2.objects.ships;
import com.maddox.JGP.Point3d;
import com.maddox.il2.ai.World;
import com.maddox.il2.ai.ground.TgtShip;
import com.maddox.il2.engine.Eff3DActor;
import com.maddox.il2.engine.HookNamed;
import com.maddox.il2.engine.LightPointActor;
import com.maddox.il2.engine.LightPointWorld;
import com.maddox.il2.engine.Loc;
import com.maddox.rts.SectFile;

public abstract class Liberty_cargo_ship extends Ship
{
    /*synthetic*/ static Class class$com$maddox$il2$objects$ships$Liberty_cargo_ship$Liberty;
    
    public static class Liberty extends BigshipGeneric implements TgtShip
    {
	public LightPointActor light1;
	public LightPointActor light2;
	public LightPointActor light3;
	public LightPointActor light4;
	public LightPointActor[] lightk;
	
	public Liberty() {
	    lightk = new LightPointActor[5];
	}
	
	public Liberty(String string, int i, SectFile sectfile,
			  String string_0_, SectFile sectfile_1_,
			  String string_2_) {
	    super(string, i, sectfile, string_0_, sectfile_1_, string_2_);
	    lightk = new LightPointActor[5];
	    Loc loc = new Loc(0.0, 0.0, 0.0, 0.0F, 0.0F, 0.0F);
	    Loc loc_3_ = new Loc();
	    Loc loc_4_ = new Loc();
	    Loc loc_5_ = new Loc();
	    Loc loc_6_ = new Loc();
	    Loc loc_7_ = new Loc();
	    if (World.getTimeofDay() >= 0.5F && World.getTimeofDay() <= 6.0F) {
		for (int i_8_ = 0; i_8_ < 6; i_8_++)
		    Eff3DActor.New(this, findHook("_CLight" + i_8_), null,
				   1.0F, "3DO/Effects/Lights/FlareWhitek.eff",
				   -1.0F);
		Eff3DActor.New(this, findHook("_GLigth"), null, 1.0F,
			       "3DO/Effects/Lights/FlareGreenkb.eff", -1.0F);
		Eff3DActor.New(this, findHook("_RLight"), null, 1.0F,
			       "3DO/Effects/Lights/FlareRedkb.eff", -1.0F);
                 {
                }   
            }
        }
    }
    
    /*synthetic*/ static Class class$(String string) {
	Class var_class;
	try {
	    var_class = Class.forName(string);
	} catch (ClassNotFoundException classnotfoundexception) {
	    throw new NoClassDefFoundError(classnotfoundexception
					       .getMessage());
	}
	return var_class;
    }
    
    static {
	new BigshipGeneric.SPAWN
	    (class$com$maddox$il2$objects$ships$Liberty_cargo_ship$Liberty == null
	     ? (class$com$maddox$il2$objects$ships$Liberty_cargo_ship$Liberty
		= class$("com.maddox.il2.objects.ships.Liberty_cargo_ship$Liberty"))
	     : class$com$maddox$il2$objects$ships$Liberty_cargo_ship$Liberty);
    }
}
tvister вне форума   Ответить с цитированием