萌新向星舰内核第二代,内有代码
2020/05/31155 浏览综合
这个作品指在为技术尚浅的萌新提供星舰内核,不需要任何调整,萌新自己蒙了皮就能用,反重力引擎自带关闭重力的功能。








begincodeV1;name:摇杆;1:Vector3 基本=fun creatVariable.Vector3(Float 0.2:Float 0.3:Float 0);2:UIButton 控制=fun ui.button(var 基本:Vector3 250,250,0:Color 0,0,255,255:String 按钮:Float 1000:Float 4);3:UICircle 范围=fun ui.circle(var 基本:Float 500:Float 10:Color 255,0,0,255);4:Vector3 触摸=fun input.touchPos();5:Float x=varf Vector3.触摸.x();6:if fun float.lt(var x:Float 0.5);7: Float 判断左=fun create.float(Float 0);8: Float 判断右=fun create.float(Float 1);9:if fun float.gte(var x:Float 0.5);10: Float 判断左=fun create.float(Float 1);11: Float 判断右=fun create.float(Float 0);12:Vector3 判定=fun input.touchPosByIndex(var 判断左);13:Vector3 判定啊=varf Vector3.判定.copy();14:Vector3 判定2=fun input.touchPosByIndex(var 判断右);15:UIButton 回归=fun ui.button(Vector3 0.6,0.2,0:Vector3 100,100,0:Color 255,255,255,255:String 按钮:Float 50:Float 4);16:UIButton 增=fun ui.button(Vector3 0.8,0.4,0:Vector3 100,100,0:Color 255,0,0,255:var 增:Float 50:Float 4);17:UIButton 减=fun ui.button(Vector3 0.8,0.2,0:Vector3 100,100,0:Color 255,0,0,255:var 减:Float 50:Float 4);18:if varf UIButton.增.isRelease();19: Float 变量=fun float.add(var 变量:Float 1);20: =varf UILabel.力量.text(var 变量);21:if varf UIButton.减.isRelease();22: Float 变量=fun float.minus(var 变量:Float 1);23: =varf UILabel.力量.text(var 变量);24:if varf UIButton.回归.isRelease();25: Float 变量=fun float.division(var 变量:var 变量);26: =varf UILabel.力量.text(var 变量);27:UILabel 力量=fun ui.text(Vector3 0.6,0.5,0:Float 32:Color 255,255,255,255:var 变量:Enum 1);28:if varf UIButton.控制.pressing();29: Vector3 判定=fun vector3.minus(var 判定:var 基本);30: Float 使用x=varf Vector3.判定.length();31: Float 使用x=fun float.multiply(var 使用x:var 变量);32: Float x=varf Vector3.判定啊.x();33: if fun float.lt(var x:Float 0.18);34: =act 25./左.active();35: =act 25./左.setMoveForceRate(var 使用x);36: =act 25./左2.active();37: =act 25./左2.setMoveForceRate(var 使用x);38: if fun float.gt(var x:Float 0.22);39: =act 25./右.active();40: =act 25./右.setMoveForceRate(var 使用x);41: =act 25./右2.active();42: =act 25./右2.setMoveForceRate(var 使用x);43: Float y=varf Vector3.判定啊.y();44: if fun float.gt(var y:Float 0.3);45: =act 304./前进.active();46: =act 304./前进.setMoveForceRate(var 使用x);47: if fun float.lt(var y:Float 0.3);48: =act 304./后退.active();49: =act 304./后退.setMoveForceRate(var 使用x);50: Vector3 判定=fun screen.toPixel(var 判定);51: Vector3 判定=varf Vector3.判定.limitLength(Float 200);52: Vector3 判定=fun screen.fromPixel(var 判定);53: Vector3 判定=fun vector3.add(var 判定:var 基本);54: =varf UIButton.控制.pos(var 判定);55:if varf UIButton.控制.isRelease();56: =varf UIButton.控制.pos(var 基本);57:UIButton 升空=fun ui.button(Vector3 0.8,0.9,0:Vector3 200,200,0:Color 0,0,255,255:var 升空:Float 50:Float 4);58:if varf UIButton.升空.pressing();59: =act 1.this.addForce(Vector3 0,2,0:Enum 0);60:UIButton 降落=fun ui.button(Vector3 0.8,0.7,0:Vector3 200,200,0:Color 0,0,255,255:var 降落:Float 50:Float 4);61:if varf UIButton.降落.pressing();62: =act 1.this.addForce(Vector3 0,-2,0:Enum 0);63:UIButton 反重力引擎=fun ui.button(Vector3 0.2,0.7,0:Vector3 250,250,0:Color 0,0,255,255:String 反重力引擎开启:Float 50:Float 4);64:if varf UIButton.反重力引擎.isRelease();65: Float 数值=fun float.add(var 数值:Float 1);66:if fun float.Approximately(var 数值:Float 1);67: =varf UIButton.反重力引擎.text(String 反重力引擎关闭);68: =act 1.this.enableGravity(Bool 0);69: =act 1.this.setAngularDrag(Float 20);70:if fun float.gt(var 数值:Float 1);71: Float 数值=fun create.float(Float 0);72: =varf UIButton.反重力引擎.text(String 反重力引擎开启);73: =act 1.this.enableGravity(Bool 1);74: =act 1.this.setAngularDrag(Float 0);endcode