Skip to content

Commit

Permalink
Merge pull request #37 from mattCarapella/develop
Browse files Browse the repository at this point in the history
Hot Fix
  • Loading branch information
xuanyudo authored Apr 1, 2018
2 parents 24fe49f + 15169e4 commit 324ad11
Show file tree
Hide file tree
Showing 49 changed files with 342 additions and 59 deletions.
Binary file modified Another.World/.vs/Another.World/v14/.suo
Binary file not shown.
Binary file added Another.World/Assets/New Terrain.asset
Binary file not shown.
10 changes: 10 additions & 0 deletions Another.World/Assets/New Terrain.asset.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 16 additions & 7 deletions Another.World/Assets/gameController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public class gameController:MonoBehaviour{
public Text ObjectDes;
public Text ObjectPrice;
public bool ui;
public bool interact = false;
public Text owner;
public Text descriptionText;
public Text worldName;
Expand All @@ -40,7 +41,7 @@ void Start()
keymap[i] = 0;
}
ui = false;
reloadWorld();
reloadWorld(0);
}
void Update()
{
Expand All @@ -56,7 +57,7 @@ void Update()
{
Cursor.visible = true;
}
if (Input.GetKeyDown(KeyCode.Escape) && !processObj)
if (Input.GetKeyDown(KeyCode.Escape) && !processObj && !interact)
{
MenuState = !MenuState;
Menu.SetActive(MenuState);
Expand Down Expand Up @@ -178,6 +179,7 @@ public void place()
placement.SetActive(true);
this.ui_up();
place_status = true;
interact = false;
}
}
public void place_request(GameObject inhand)
Expand All @@ -188,6 +190,7 @@ public void place_request(GameObject inhand)
placement.SetActive(false);

this.ui_down();

place_status = false;
GameObject temp = Instantiate(inhand);
temp.transform.position = inhand.transform.position;
Expand All @@ -202,7 +205,7 @@ public void place_request(GameObject inhand)
public void addEntryToList(string name, float x, float y, float z)
{
GameObject temp = Instantiate(listItem);
temp.transform.parent = listView.transform;
temp.transform.SetParent(listView.transform);
temp.transform.GetChild(0).GetComponent<Text>().text = name;
temp.transform.GetChild(1).GetComponent<Text>().text = "x: " + x;
temp.transform.GetChild(2).GetComponent<Text>().text = "y: " + y;
Expand Down Expand Up @@ -244,16 +247,22 @@ public void exit()
{
Application.Quit();
}
public void reloadWorld()
public void reloadWorld(int value)
{
env = value;
if (env == 0)
{
StartCoroutine(generateWorld());

}
else
/*else
{
StartCoroutine(generateInGame());
}
}*/
Player.GetComponent<PlayerController>().reset();
}
public void interact_off()
{
interact = false;
}

}
11 changes: 6 additions & 5 deletions Another.World/Assets/object_property.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public class object_property : MonoBehaviour {
private string _name;
private string _price;
private string _description;
public GameObject game;
public GameObject _game;
private gameController _controller;
public GameObject description;
public Button Back;
Expand All @@ -19,7 +19,7 @@ public class object_property : MonoBehaviour {

private bool _ray =false;
void Start () {
_controller = game.GetComponent<gameController>();
_controller = _game.GetComponent<gameController>();
}

public void setName(string name)
Expand All @@ -39,7 +39,7 @@ public void setRay(bool ray)
_ray = ray;
if (!_ray)
{
game.GetComponent<gameController>().processObj = null;
_game.GetComponent<gameController>().processObj = null;
}
}
public bool getRay()
Expand Down Expand Up @@ -70,11 +70,12 @@ public void attachUI()
}
// Update is called once per frame
void Update () {
if (_ray && Input.GetKeyDown(KeyCode.F))
if (_ray && Input.GetKeyDown(KeyCode.F) && !_game.GetComponent<gameController>().MenuState && !_game.GetComponent<gameController>().interact && !_game.GetComponent<gameController>().processObj)
{
this.attachUI();
description.SetActive(true);
game.GetComponent<gameController>().ui_up();
_game.GetComponent<gameController>().ui_up();
_game.GetComponent<gameController>().interact = true;
Back.interactable = true;

}
Expand Down
201 changes: 199 additions & 2 deletions Another.World/Assets/scene/Registration Page.unity
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,80 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 481959088}
--- !u!1 &506170802
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 506170803}
- component: {fileID: 506170805}
- component: {fileID: 506170804}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &506170803
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 506170802}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1813849975}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &506170804
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 506170802}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MaxSize: 40
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Back to Login
--- !u!222 &506170805
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 506170802}
--- !u!1 &645520299
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1344,6 +1418,7 @@ RectTransform:
- {fileID: 645520300}
- {fileID: 257167832}
- {fileID: 2020317528}
- {fileID: 1813849975}
m_Father: {fileID: 791438331}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
Expand Down Expand Up @@ -1379,7 +1454,7 @@ MonoBehaviour:
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_UiScaleMode: 1
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
Expand Down Expand Up @@ -1696,6 +1771,128 @@ CanvasRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1624924109}
--- !u!1 &1813849974
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1813849975}
- component: {fileID: 1813849978}
- component: {fileID: 1813849977}
- component: {fileID: 1813849976}
m_Layer: 5
m_Name: Back
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &1813849975
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1813849974}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 506170803}
m_Father: {fileID: 1355147020}
m_RootOrder: 5
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: 20, y: -100}
m_SizeDelta: {x: 320, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1813849976
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1813849974}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1392445389, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 0.75, g: 0.22610293, b: 0.22610293, a: 1}
m_HighlightedColor: {r: 1, g: 0.22794116, b: 0.22794116, a: 1}
m_PressedColor: {r: 1, g: 0.64705884, b: 0.64705884, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 1813849977}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 312657814}
m_MethodName: switchScene
m_Mode: 3
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
m_TypeName: UnityEngine.UI.Button+ButtonClickedEvent, UnityEngine.UI, Version=1.0.0.0,
Culture=neutral, PublicKeyToken=null
--- !u!114 &1813849977
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1813849974}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!222 &1813849978
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1813849974}
--- !u!1 &1930292796
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1864,7 +2061,7 @@ MonoBehaviour:
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 1
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
Expand Down
Loading

0 comments on commit 324ad11

Please sign in to comment.