问题描述
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tetris : MonoBehavIoUr
{
void Update()
{
transform.Translate(new Vector3(0,-3 * Time.deltaTime,0) );
CheckUserinput();
}
void CheckUserinput(){
if (Input.GetKeyDown(KeyCode.Space))
{
transform.Rotate(0,90);
}
}
如何使对象每次旋转正常掉落?
解决方法
请尝试将Translate(Vector3,Space)方法与Space.world一起使用,或将视图对象作为子对象放置到Tetris组件中。俄罗斯方块组件应具有对该组件的引用。
# Read NetCDF files
from satpy import Scene
import glob
filenames = glob.glob('myfiles*.nc')
scn = Scene(filenames=filenames,reader='tropomi_l2')
scn.load(['qq'])
mask = SA_mask_poly.mask(d,lat_name='latitude',lon_name='longitude')
out_sel = d.compute().where(mask == 0,drop=True)
plt.figure(figsize=(12,8))
ax = plt.axes()
out_sel.plot(ax = ax,x='longitude',y='latitude')
SA.plot(ax = ax,alpha = 0.8,facecolor = 'none',lw = 1)