Skip to content

Commit

Permalink
Fixed Issue #58, #60, #61, #63. Added #62
Browse files Browse the repository at this point in the history
Fixed Issue #58, #60, #61, #63. Added #62
  • Loading branch information
hel1ow0r1d committed Apr 18, 2018
1 parent efd3ea5 commit 80d1402
Show file tree
Hide file tree
Showing 118 changed files with 522 additions and 882 deletions.
Binary file modified Another.World/.vs/Another.World/v15/Server/sqlite3/storage.ide
Binary file not shown.
37 changes: 17 additions & 20 deletions Another.World/Another.World.sln
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Another.World", "Assembly-CSharp.csproj", "{EC44AC3C-9D4A-7D06-A833-71D25625A59D}"
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Another.World", "Another.World.csproj", "{C44D7093-5514-E272-EDC8-F8A6C4A414A7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Another.World", "Assembly-CSharp-firstpass.csproj", "{59F47534-E09F-C8CD-302F-9D8DEEF88D9B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Another.World.Plugins", "Another.World.Plugins.csproj", "{D2592F9C-D3E0-1D88-0006-A5DA930A41FD}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Another.World", "Assembly-CSharp-Editor.csproj", "{BC543D25-A5BE-5E88-0654-AF157FD7DBD6}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Another.World.Editor", "Another.World.Editor.csproj", "{A3CF693A-E4E2-B11D-9935-D7B3FECCC9B2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{EC44AC3C-9D4A-7D06-A833-71D25625A59D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EC44AC3C-9D4A-7D06-A833-71D25625A59D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EC44AC3C-9D4A-7D06-A833-71D25625A59D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EC44AC3C-9D4A-7D06-A833-71D25625A59D}.Release|Any CPU.Build.0 = Release|Any CPU
{59F47534-E09F-C8CD-302F-9D8DEEF88D9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{59F47534-E09F-C8CD-302F-9D8DEEF88D9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{59F47534-E09F-C8CD-302F-9D8DEEF88D9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{59F47534-E09F-C8CD-302F-9D8DEEF88D9B}.Release|Any CPU.Build.0 = Release|Any CPU
{BC543D25-A5BE-5E88-0654-AF157FD7DBD6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BC543D25-A5BE-5E88-0654-AF157FD7DBD6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BC543D25-A5BE-5E88-0654-AF157FD7DBD6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BC543D25-A5BE-5E88-0654-AF157FD7DBD6}.Release|Any CPU.Build.0 = Release|Any CPU
{C44D7093-5514-E272-EDC8-F8A6C4A414A7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C44D7093-5514-E272-EDC8-F8A6C4A414A7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C44D7093-5514-E272-EDC8-F8A6C4A414A7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C44D7093-5514-E272-EDC8-F8A6C4A414A7}.Release|Any CPU.Build.0 = Release|Any CPU
{D2592F9C-D3E0-1D88-0006-A5DA930A41FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D2592F9C-D3E0-1D88-0006-A5DA930A41FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D2592F9C-D3E0-1D88-0006-A5DA930A41FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D2592F9C-D3E0-1D88-0006-A5DA930A41FD}.Release|Any CPU.Build.0 = Release|Any CPU
{A3CF693A-E4E2-B11D-9935-D7B3FECCC9B2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A3CF693A-E4E2-B11D-9935-D7B3FECCC9B2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A3CF693A-E4E2-B11D-9935-D7B3FECCC9B2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A3CF693A-E4E2-B11D-9935-D7B3FECCC9B2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
StartupItem = Assembly-CSharp.csproj
EndGlobalSection
EndGlobal
10 changes: 5 additions & 5 deletions Another.World/Assets/Resources/AWPlayer.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -8031,7 +8031,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'version: 0.3.1'
m_Text: 'version: 0.3.2'
--- !u!114 &114403501846066510
MonoBehaviour:
m_ObjectHideFlags: 1
Expand Down Expand Up @@ -16384,7 +16384,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 36.41584, y: 159.73451}
m_AnchoredPosition: {x: -3.0518, y: 159.73451}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224319558560301628
Expand Down Expand Up @@ -17489,7 +17489,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 129, y: 159.7}
m_AnchoredPosition: {x: 86, y: 159.7}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224569189242859674
Expand Down Expand Up @@ -18112,7 +18112,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 182.6, y: -33}
m_AnchoredPosition: {x: 182.6, y: -18}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224692044542944092
Expand Down Expand Up @@ -19191,7 +19191,7 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 90, y: -33}
m_AnchoredPosition: {x: 90, y: -18}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224946484614176284
Expand Down
8 changes: 6 additions & 2 deletions Another.World/Assets/UpdateToDatabase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ public class UpdateToDatabase : MonoBehaviour {
string URL = "http://ec2-18-232-184-23.compute-1.amazonaws.com/CreateWorld.php";

private int userID;
private string username;
private string worldName;
private string worldInfo;
private int groundToStore;
Expand All @@ -28,6 +29,7 @@ void Start () {
// Update is called once per frame
void Update () {
userID = Login.send_id;
username = Login.send_username;
worldName = SetWorldInfo.Worldname;
worldInfo = SetWorldInfo.Worldinfo;
groundToStore = setGround.groundToStore;
Expand All @@ -48,6 +50,7 @@ public void updateDatabase () {

IEnumerator worldUpdate() {
WWWForm form = new WWWForm();
/*
Debug.Log ("================Version 0.0.2===================");
Debug.Log ("idPost:" + userID);
Debug.Log ("worldNamePost:" + worldName); //String
Expand All @@ -57,9 +60,10 @@ IEnumerator worldUpdate() {
Debug.Log ("xPost:" + x_pos);//Int
Debug.Log ("yPost:" + y_pos);//Int
Debug.Log ("zPost:" + z_pos);//Int

*/

form.AddField ("idPost", userID);
form.AddField ("usernamePost", username);
form.AddField ("worldNamePost", worldName);
form.AddField ("worldInfoPost", worldInfo);
form.AddField ("worldSkyPost", skyToStore);
Expand All @@ -73,6 +77,6 @@ IEnumerator worldUpdate() {
WWW www = new WWW(URL, form);

yield return www;
Debug.Log (www.text);
//Debug.Log (www.text);
}
}
40 changes: 20 additions & 20 deletions Another.World/Assets/gameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -182,9 +182,9 @@ IEnumerator generateInGame(int world)
//model_id; x; y; z; rx; ry; rz "\n"
WWWForm form = new WWWForm();
form.AddField("worldidPost", world);
WWW www = new WWW(URL);
WWW www = new WWW(URL, form);
yield return www;
Debug.Log(www.text);
//Debug.Log(www.text);
string response = www.text;
string[] rows = response.Split('\n');
string[] fcol = rows[0].Split(';');
Expand All @@ -207,37 +207,38 @@ IEnumerator generateWorld()
WWWForm form = new WWWForm();
form.AddField("idPost", Login.send_id);
WWW www = new WWW(URL, form);
Debug.Log(URL);
//Debug.Log(URL);
yield return www;
string response = www.text;
Debug.Log(response);
//Debug.Log(response);
string[] rows = response.Split('\n');

foreach (string row in rows)
{
if (row != "")
{
Debug.Log(row);
//Debug.Log(row);
string[] cols = row.Split(';');
Debug.Log(cols[0]);
//Debug.Log(cols[0]);
int worldId = int.Parse(cols[0]);
Debug.Log(worldId);
//Debug.Log(worldId);
int userId = int.Parse(cols[1]);
string title = cols[2];
string description = cols[3];
float x = float.Parse(cols[4]);
float y = float.Parse(cols[5]);
float z = float.Parse(cols[6]);

Debug.Log(x);
string username = cols[2];
string title = cols[3];
string description = cols[4];
float x = float.Parse(cols[5]);
float y = float.Parse(cols[6]);
float z = float.Parse(cols[7]);

//Debug.Log(x);
GameObject temp = Instantiate(worldModelSample);
temp.GetComponent<planet>()._game = this.gameObject;
temp.transform.position = new Vector3(x, y, z);
planet sample = temp.GetComponent<planet>();

sample.setDes(description);
sample.setId(worldId);
sample.setOwner(userId.ToString());
sample.setOwner(username);
sample.setName(title);
addEntryToList(title, x, y, z);

Expand All @@ -251,7 +252,6 @@ public void ui_up()
CameraDisable = true;
MouseVisiable = true;
Cursor.visible = true;

}

public void ui_down()
Expand All @@ -264,7 +264,7 @@ public void ui_down()
public void place()
{

Debug.Log(place_status);
//Debug.Log(place_status);
confirm.interactable = true;
if (place_status == false)
{
Expand All @@ -276,7 +276,7 @@ public void place()
}
public void place_request()
{
Debug.Log(place_status);
//Debug.Log(place_status);
if (place_status == true)
{

Expand Down Expand Up @@ -320,10 +320,10 @@ IEnumerator addObjToDB(GameObject inhand)
form.AddField("rotationxPost", inhand.transform.rotation.x.ToString());
form.AddField("rotationyPost", inhand.transform.rotation.y.ToString());
form.AddField("rotationzPost", inhand.transform.rotation.z.ToString());
string url = "http://ec2-18-232-184-23.compute-1.amazonaws.com/test.php";
string url = "http://ec2-18-232-184-23.compute-1.amazonaws.com/AddObjects.php";
WWW www = new WWW(url, form);
yield return www;
Debug.Log(www.text);
//Debug.Log(www.text);
}
public void addEntryToList(string name, float x, float y, float z)
{
Expand Down
6 changes: 3 additions & 3 deletions Another.World/Assets/loadWorld.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ public class loadWorld : MonoBehaviour {

// Use this for initialization
void Start () {
// WWWForm form = new WWWForm();

skyNumFromDB = UpdateToDatabase.testSkyNum;
groundNumFromDB = UpdateToDatabase.testGoundNum;


Debug.Log("Gen Wrold with Sky " + skyNumFromDB + " and Gound# " + groundNumFromDB);
//Debug.Log("Gen World with Sky " + skyNumFromDB + " and Ground# " + groundNumFromDB);
switch (skyNumFromDB)
{
case 1:
Expand Down Expand Up @@ -111,7 +111,7 @@ void Update () {
public void attachSkyandGround(int skyNumFromDB, int groundNumFromDB)
{

Debug.Log("Gen Wrold with Sky " + skyNumFromDB + " and Gound# " + groundNumFromDB);
//Debug.Log("Gen World with Sky " + skyNumFromDB + " and Ground# " + groundNumFromDB);
switch (skyNumFromDB)
{
case 1:
Expand Down
2 changes: 1 addition & 1 deletion Another.World/Assets/scene/Start scene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1829,7 +1829,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'version: 0.3.1'
m_Text: 'version: 0.3.2'
--- !u!222 &735768412
CanvasRenderer:
m_ObjectHideFlags: 0
Expand Down
12 changes: 11 additions & 1 deletion Another.World/Assets/scene/World.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 1
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 0}
m_IndirectSpecularColor: {r: 0.44657868, g: 0.49641263, b: 0.57481706, a: 1}
m_IndirectSpecularColor: {r: 0.44657898, g: 0.4964133, b: 0.5748178, a: 1}
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -171,6 +171,11 @@ Prefab:
propertyPath: Inventory
value:
objectReference: {fileID: 279294772}
- target: {fileID: 114578545421421134, guid: 7ed7c285d05ebce4f85b9871df7dceab,
type: 2}
propertyPath: m_Text
value:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 7ed7c285d05ebce4f85b9871df7dceab, type: 2}
m_IsPrefabParent: 0
Expand Down Expand Up @@ -455,6 +460,11 @@ Prefab:
propertyPath: instantiationId
value: 2
objectReference: {fileID: 0}
- target: {fileID: 114985425512489494, guid: c37a740780fd9894db868bbe79718d7d,
type: 2}
propertyPath: m_Text
value:
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: c37a740780fd9894db868bbe79718d7d, type: 2}
m_IsPrefabParent: 0
Loading

0 comments on commit 80d1402

Please sign in to comment.