+1

Can you help me develop Geveze Engine

discard your suggestions as source code https://code.sololearn.com/ccZRCrfibGb4/?ref=app

8/25/2019 11:08:11 PM

Bomba

2 Answers

New Answer

+2

//your code need refactoring, think about shorter code like: public void move(final View _obj, final String _mt, final double _n) { float float_n = (float)(_n); switch(_mt) { case "x": _obj.setTranslationX(float_n); break; case "y": _obj.setTranslationY(float_n); break; case "z": _obj.setTranslationZ(float_n); break; // ... } } //or public void location( ... ) { if ( ... ) { String[] xyz = {"x","y","z","scaleX","scaleY","alpha", "rotation","rotationX","rotationY"}; for (String s: xyz) if (_e.equals(s)) { move(_obj, s, _st); break; } } }

0

Thank you zamiak