using FalcoEngine;
using System;
using System.Collections;
using System.Collections.Generic;

public class small_cube_s : MonoBehaviour
{
	private float grave;
	private float up_power=0.1f;
	private float dir;
	private float rot;
	private float rot_speed;
	private float scale;
	
	void Start()
	{
		scale=FalcoEngine.Random.Range(0.27f,0.3f);
		transform.localScale=new Vector3(scale,scale,scale);
		up_power=FalcoEngine.Random.Range(0.02f,0.07f);
		rot_speed=FalcoEngine.Random.Range(-10f,10f);
		dir=FalcoEngine.Random.Range(-0.025f,0.025f);
		
		transform.rotation=Quaternion.Euler(180,0,FalcoEngine.Random.Range(0,360f));
	}
	
	void FixedUpdate()
	{
		rot+=rot_speed;
		transform.rotation=Quaternion.Euler(180,0,rot);
		
		grave+=0.001f;
		transform.position-=new Vector3(0,grave,0);
		transform.position+=new Vector3(dir,up_power,0);
	}
}
