public override void Move() { base.Move(); if (isJump) { jumpTime += Time.fixedDeltaTime; float jumpPosition = PhysicsEX.Jump(jumpTime, jumpForce, gravity); if (jumpPosition < 0) { jumpPosition = 0f; isJump = false; c = null; c = CoroutineEX.RandomDelay(this, SetJump, delayMin, delayMax); } body.localPosition = Vector3.up * jumpPosition; } }
protected override void OnEnable() { base.OnEnable(); jumpTime = 0f; c = CoroutineEX.RandomDelay(this, SetJump, delayMin, delayMax); }
protected override void Start() { base.Start(); c = CoroutineEX.RandomDelay(this, SetRotation, 0f, 5f); }