Files
alternativa3d-archive/Alternativa3D2/2.0/com/alternativagame/engine3d/material/.svn/text-base/HelperMaterial.as.svn-base
2024-10-05 12:11:16 +01:00

52 lines
1.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package com.alternativagame.engine3d.material {
import com.alternativagame.type.RGB;
public class HelperMaterial extends ObjectMaterial {
// Показывать подпись
public var text:Boolean;
// Цвет подписи
public var textColor:RGB = new RGB(0xFFFFFF);
// Показывать связь с родителем
public var link:Boolean;
// Показывать тело объекта
public var body:Boolean;
// Показывать вспомогательную графику объекта
public var gizmo:Boolean;
// Цвет тела объекта
public var bodyColor:RGB = new RGB(0xCCCCCC);
public function HelperMaterial(text:Boolean = true, link:Boolean = true, gizmo:Boolean = true, body:Boolean = true) {
this.text = text;
this.link = link;
this.gizmo = gizmo;
this.body = body;
}
// Клон
override public function clone():Material {
var res:HelperMaterial = new HelperMaterial();
cloneParams(res);
return res;
}
// Клонировать параметры
override protected function cloneParams(material:*):void {
var mat:HelperMaterial = HelperMaterial(material);
super.cloneParams(mat);
mat.text = text;
mat.textColor = textColor.clone();
mat.body = body;
mat.gizmo = gizmo;
mat.bodyColor = bodyColor.clone();
mat.link = link;
}
}
}