// private float TimeRecord; public Vector3 GetSpeed() { if (OldPos != Vector3.zero && BeforePos != Vector3.zero) { return(Vector3Extensions.MoveByToSpeed(target: OldPos - BeforePos) / 5f); } else { return(Vector3.zero); } }
public Vector3 PosCalculation(useskilltype postype, Vector3 pos, Vector3 pos1, Vector3 pos2, int dir) { Vector3 add = new Vector3(); switch (postype) { case useskilltype.fixeda: add = pos + new Vector3(pos1.x * dir, pos1.y, pos1.z);; break; case useskilltype.random: Vector3 sdas = Vector3Extensions.RandomMinMax(pos1, pos2); add = pos + new Vector3(sdas.x * dir, sdas.y, sdas.z); break; } return(add); }