Esempio n. 1
0
    internal static void SetRotateStart(GameObject obj, float speed, bool isclockwise, bool isuseacc)
    {
        if (obj.GetComponent <RotControl>() != null)
        {
            Destroy(obj.GetComponent <RotControl>());
        }
        RotControl rotControl = obj.AddComponent <RotControl>();

        rotControl.SetRotControl(speed, isclockwise, isuseacc);
    }
Esempio n. 2
0
    internal static void SetRotateTo(GameObject obj, float speedlerp, float targetrot)
    {
        if (obj.GetComponent <RotControl>() != null)
        {
            Destroy(obj.GetComponent <RotControl>());
        }
        RotControl rotControl = obj.AddComponent <RotControl>();

        rotControl.SetRotControl(speedlerp, targetrot);
    }