Android Open Source - tapdefence Line






From Project

Back to project page tapdefence.

License

The source code is released under:

MIT License

If you think the Android project tapdefence listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package com.kulinich.tapdefence.engine;
//  w w  w  .  j  av a2 s .  co m
class Line {
  Point a;
  Point b;
  
  float dx;
  float dy;
  
  float length;

  Line() {};

  Line(Point a, Point b) {
    this.a = a;
    this.b = b;
    calculateParameters();
  }
  
  void calculateParameters() {
    length = Utils.metrics(a, b);
    dx = (b.x - a.x) / length;
    dy = (b.y - a.y) / length;
  }
}




Java Source Code List

com.kulinich.tapdefence.GameActivity.java
com.kulinich.tapdefence.MainActivity.java
com.kulinich.tapdefence.ScoreDialog.java
com.kulinich.tapdefence.engine.Constants.java
com.kulinich.tapdefence.engine.Enemy.java
com.kulinich.tapdefence.engine.GameSurface.java
com.kulinich.tapdefence.engine.GameThread.java
com.kulinich.tapdefence.engine.Game.java
com.kulinich.tapdefence.engine.InputHandler.java
com.kulinich.tapdefence.engine.Line.java
com.kulinich.tapdefence.engine.Particle.java
com.kulinich.tapdefence.engine.Point.java
com.kulinich.tapdefence.engine.Star.java
com.kulinich.tapdefence.engine.Utils.java
com.kulinich.tapdefence.engine.Wall.java