diff --git a/.gitignore b/.gitignore index 4409166..1e65ade 100644 --- a/.gitignore +++ b/.gitignore @@ -45,6 +45,7 @@ .idea/gradle.xml .idea/dictionaries .idea/libraries +.idea/caches # Keystore files *.jks diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser index b13a40a..225349e 100644 --- a/.idea/caches/build_file_checksums.ser +++ b/.idea/caches/build_file_checksums.ser Binary files differ diff --git a/src/framework/RWT/RWTSprite.java b/src/framework/RWT/RWTSprite.java index 4d2c0a2..90b36f2 100644 --- a/src/framework/RWT/RWTSprite.java +++ b/src/framework/RWT/RWTSprite.java @@ -1,12 +1,11 @@ package framework.RWT; -import functions.Position; +import myLibrary.Position; public class RWTSprite { private int textureNo; // 表示座標 - private Position pos; - private + private Position pos; } diff --git a/src/functions/Position.java b/src/functions/Position.java deleted file mode 100644 index 3b09fcd..0000000 --- a/src/functions/Position.java +++ /dev/null @@ -1,34 +0,0 @@ -package functions; - -public class Position implements Cloneable { - public T x, y, z; - - public Position() { - x = 0.0; - y = 0.0; - } - - public Position(T1 val1, T2 val2) { - first = val1; - second = val2; - } - - public void swap(Position t){ - Position tmp = this; - first = t.first; - second = t.second; - t = tmp; - } - - @SuppressWarnings("unchecked") - @Override - public Position clone(){ - Position p = new Position(); - try { - p = (Position)super.clone(); - } catch (CloneNotSupportedException e) { - e.printStackTrace(); - } - return p; - } -} diff --git a/src/myLibrary/Position.java b/src/myLibrary/Position.java new file mode 100644 index 0000000..c75d7bf --- /dev/null +++ b/src/myLibrary/Position.java @@ -0,0 +1,37 @@ +package myLibrary; + +public class Position implements Cloneable { + public T x, y, z; + + public Position() { + x = null; + y = null; + z = null; + } + + public Position(T val1, T val2) { + x = val1; + y = val2; + z = null; + } + + public void swap(Position t){ + Position tmp = this.clone(); + x = t.x; + y = t.y; + z = t.z; + t = tmp; + } + + @SuppressWarnings("unchecked") + @Override + public Position clone(){ + Position p = new Position(); + try { + p = (Position)super.clone(); + } catch (CloneNotSupportedException e) { + e.printStackTrace(); + } + return p; + } +}