Ejemplo n.º 1
0
        public void Sample(LFloat time)
        {
            if (Application.isPlaying)
            {
                return;
            }

            if (animState == null)
            {
                return;
            }
            if (!Application.isPlaying)
            {
                animComp.Play();
            }

            animState.enabled = true;
            animState.weight  = 1;
            animState.time    = time.ToFloat();
            animComp.Sample();
            if (!Application.isPlaying)
            {
                animState.enabled = false;
            }
        }
        public override void OnSkillFire(LFloat range)
        {
            var tarns = transform;

            if (skillGo == null)
            {
                var go = GameObject.Instantiate(UnityEntityService.ViewConfig.skillEffectPrefab, tarns, false);
                go.transform.SetParent(tarns, false);
                skillGo = go;
            }

            skillGo.SetActive(true);
            skillGo.transform.localScale = Vector3.one * (range.ToFloat() * 2);
        }
 public static LFloat FloatField(string label, LFloat value, params GUILayoutOption[] options)
 {
     return(EditorGUILayout.FloatField(label, value.ToFloat(), options).ToLFloat());
 }
Ejemplo n.º 4
0
 public void SetRotation(LFloat val)
 {
     transform.rotation = Quaternion.Euler(0, 0, val.ToFloat());
     OnSetRotation(val);
 }