physics wip

This commit is contained in:
2015-06-03 23:05:53 +06:00
parent 918284ca6d
commit e0ac3b82cd
25 changed files with 4947 additions and 3003 deletions

View File

@@ -0,0 +1,25 @@
using UnityEngine;
using System.Collections;
namespace IsoTools { namespace Examples {
public class CircleFly : MonoBehaviour {
public float FlyRadius = 150.0f;
public float FlySpeed = 1.0f;
Vector3 _start_pos;
float _fly_timer;
void Start() {
_start_pos = transform.position;
_fly_timer = 0.0f;
}
void Update () {
_fly_timer += FlySpeed * Time.deltaTime;
transform.position = new Vector3(
_start_pos.x + Mathf.Cos(_fly_timer) * FlyRadius,
_start_pos.y + Mathf.Sin(_fly_timer) * FlyRadius,
_start_pos.z);
}
}
}} // namespace IsoTools::Examples