示例#1
0
 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;
 }
示例#2
0
 // 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);
     }
 }
示例#3
0
 public void StepFoward(StepForwardValues sfv)
 {
     player.moveFoward(sfv);
 }
示例#4
0
 public void stepFoward(StepForwardValues v)
 {
     weaponBase.StepFoward(v);
 }
示例#5
0
 public override void moveFoward(StepForwardValues sfv)
 {
     SetCollidersTriggerNotTerrain(true);
     stepFoward.SetStep(sfv, viewDir, SetCollidersTriggerNotTerrain, false);
 }
示例#6
0
 public override void moveFoward(StepForwardValues sfv)
 {
 }
示例#7
0
 public abstract void moveFoward(StepForwardValues sfv);
示例#8
0
 public override void moveFoward(StepForwardValues sfv)
 {
     IgnoreEnemyPlayerCollison(true);
     stepFoward.SetStep(sfv, viewDir, IgnoreEnemyPlayerCollison, false);
 }