public void SetStep(StepForwardValues sfv, Vector2 stepDir, FSMbase.StepFowardCallBack callBack, bool v)
 {
     this.sfv = sfv;
     sf_eTime = 0;
     setAngle(sfv.angle, stepDir);
     stepSpeed   = sfv.distance / sfv.duration;
     endCallBack = callBack;
     endValue    = v;
 }
 // Update is called once per frame
 void FixedUpdate()
 {
     if (sfv == null)
     {
         return;
     }
     if (sf_eTime <= sfv.duration)
     {
         if (stepDir != Vector2.zero)
         {
             rigid.MovePosition((Vector2)transform.position + stepDir * stepSpeed * Time.deltaTime);
             sf_eTime += Time.deltaTime;
         }
     }
     else
     {
         sfv = null;
         endCallBack.Invoke(endValue);
     }
 }
Exemple #3
0
 public void StepFoward(StepForwardValues sfv)
 {
     player.moveFoward(sfv);
 }
Exemple #4
0
 public void stepFoward(StepForwardValues v)
 {
     weaponBase.StepFoward(v);
 }
Exemple #5
0
 public override void moveFoward(StepForwardValues sfv)
 {
     SetCollidersTriggerNotTerrain(true);
     stepFoward.SetStep(sfv, viewDir, SetCollidersTriggerNotTerrain, false);
 }
 public override void moveFoward(StepForwardValues sfv)
 {
 }
 public abstract void moveFoward(StepForwardValues sfv);
 public override void moveFoward(StepForwardValues sfv)
 {
     IgnoreEnemyPlayerCollison(true);
     stepFoward.SetStep(sfv, viewDir, IgnoreEnemyPlayerCollison, false);
 }