Example #1
0
 public MoverFly(ActFlyObj obj, Character target, HitCallbackFly onTriggerEnter)
 {
     this.Target          = target;
     this.mMoveSpeed      = obj.MoveSpeed;
     this.mMoveStartSpeed = obj.MoveSpeed;
     this.mMoveSpeedCurve = GetCurve(obj.MoveSpeedCurve);
     this.mMoveStartTime  = Time.time;
     this.Load(obj, onTriggerEnter);
 }
Example #2
0
 public void Load(ActFlyObj obj, HitCallbackFly hitCallback)
 {
     mFlyObj = obj;
     if (obj.World)
     {
         Transform p = obj.Skill.Caster.Avatar.GetBindTransform(obj.CasterBind);
         mUnit = GTWorld.Instance.Ect.LoadEffect(obj.ID, 0, obj.Retain);
         mUnit.CacheTransform.parent           = p;
         mUnit.CacheTransform.localPosition    = obj.Offset;
         mUnit.CacheTransform.localEulerAngles = obj.Euler;
         mUnit.CacheTransform.parent           = null;
         mUnit.CacheTransform.localScale       = obj.Scale;
         mUnit.CacheTransform.localEulerAngles = obj.Euler + obj.Skill.Caster.Euler;
     }
     else
     {
         Transform p = obj.Skill.Caster.Avatar.GetBindTransform(obj.CasterBind);
         mUnit = GTWorld.Instance.Ect.LoadEffect(obj.ID, 0, GTTransform.Create(obj.Offset, obj.Euler, obj.Scale), p, obj.Retain);
     }
     mUnit.TriggerEnter = (other) => { hitCallback(this, other); };
     mIsLoaded          = true;
     CacheTransform     = mUnit.CacheTransform;
 }