Search in sources :

Example 1 with VS10N051CControl

use of com.cas.circuit.control.VS10N051CControl in project TeachingInSimulation by ScOrPiOzzy.

the class VS10N051CLogic method initialize.

@Override
public void initialize(Node elecCompMdl) {
    super.initialize(elecCompMdl);
    List<Magnetism> magnetisms = elecComp.getDef().getMagnetisms();
    for (Magnetism magnetism : magnetisms) {
        List<ControlIO> controlIOs = magnetism.getControlIOs();
        for (ControlIO controlIO : controlIOs) {
            button = controlIO;
            break;
        }
    }
    // 添加碰撞监听control
    control = new VS10N051CControl(button);
    elecCompMdl.addControl(control);
}
Also used : VS10N051CControl(com.cas.circuit.control.VS10N051CControl) ControlIO(com.cas.circuit.vo.ControlIO) Magnetism(com.cas.circuit.vo.Magnetism)

Aggregations

VS10N051CControl (com.cas.circuit.control.VS10N051CControl)1 ControlIO (com.cas.circuit.vo.ControlIO)1 Magnetism (com.cas.circuit.vo.Magnetism)1