Commit 905f67cc authored by szefo09's avatar szefo09 Committed by GitHub

Merge pull request #1 from Unicorn369/Android

merge
parents 3fe57757 c0cfa20e
......@@ -6,22 +6,17 @@ ifndef config
endif
export config
PROJECTS := sqlite3 ocgcore
PROJECTS := ocgcore
.PHONY: all clean help $(PROJECTS)
all: $(PROJECTS)
sqlite3:
@echo "==== Building sqlite3 ($(config)) ===="
@${MAKE} --no-print-directory -C . -f sqlite3.make
ocgcore:
@echo "==== Building ocgcore ($(config)) ===="
@${MAKE} --no-print-directory -C . -f ocgcore.make
clean:
@${MAKE} --no-print-directory -C . -f sqlite3.make clean
@${MAKE} --no-print-directory -C . -f ocgcore.make clean
help:
......@@ -34,7 +29,6 @@ help:
@echo "TARGETS:"
@echo " all (default)"
@echo " clean"
@echo " sqlite3"
@echo " ocgcore"
@echo ""
@echo "For more information, see http://industriousone.com/premake/quick-start"
# GNU Make project makefile autogenerated by Premake
ifndef config
config=release
endif
ifndef verbose
SILENT = @
endif
ifndef CC
CC = gcc
endif
ifndef CXX
CXX = g++
endif
ifndef AR
AR = ar
endif
ifeq ($(config),release)
OBJDIR = ../../obj/Linux/x86_64/sqlite3
TARGETDIR = ../../bin/x86_64
TARGET = $(TARGETDIR)/libsqlite3.so
DEFINES += -DLUA_USE_LINUX
INCLUDES +=
CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
CFLAGS += $(CPPFLAGS) $(ARCH) -Os -fPIC -fno-strict-aliasing -Wno-multichar
CXXFLAGS += $(CFLAGS)
LDFLAGS += -s -shared
LIBS +=
RESFLAGS += $(DEFINES) $(INCLUDES)
LDDEPS +=
LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(ARCH) $(LIBS)
define PREBUILDCMDS
endef
define PRELINKCMDS
endef
define POSTBUILDCMDS
endef
endif
ifeq ($(config),release32)
OBJDIR = ../../obj/Linux/x86/sqlite3
TARGETDIR = ../../bin/x86
TARGET = $(TARGETDIR)/libsqlite3.so
DEFINES += -DLUA_USE_LINUX
INCLUDES +=
CPPFLAGS += -MMD -MP $(DEFINES) $(INCLUDES)
CFLAGS += $(CPPFLAGS) $(ARCH) -Os -m32 -fPIC -fno-strict-aliasing -Wno-multichar
CXXFLAGS += $(CFLAGS)
LDFLAGS += -s -shared -m32 -L/usr/lib32
LIBS +=
RESFLAGS += $(DEFINES) $(INCLUDES)
LDDEPS +=
LINKCMD = $(CXX) -o $(TARGET) $(OBJECTS) $(LDFLAGS) $(RESOURCES) $(ARCH) $(LIBS)
define PREBUILDCMDS
endef
define PRELINKCMDS
endef
define POSTBUILDCMDS
endef
endif
OBJECTS := \
$(OBJDIR)/sqlite3.o \
RESOURCES := \
SHELLTYPE := msdos
ifeq (,$(ComSpec)$(COMSPEC))
SHELLTYPE := posix
endif
ifeq (/bin,$(findstring /bin,$(SHELL)))
SHELLTYPE := posix
endif
.PHONY: clean prebuild prelink
all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET)
@:
$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES)
@echo Linking sqlite3
$(SILENT) $(LINKCMD)
$(POSTBUILDCMDS)
$(TARGETDIR):
@echo Creating $(TARGETDIR)
ifeq (posix,$(SHELLTYPE))
$(SILENT) mkdir -p $(TARGETDIR)
else
$(SILENT) mkdir $(subst /,\\,$(TARGETDIR))
endif
$(OBJDIR):
@echo Creating $(OBJDIR)
ifeq (posix,$(SHELLTYPE))
$(SILENT) mkdir -p $(OBJDIR)
else
$(SILENT) mkdir $(subst /,\\,$(OBJDIR))
endif
clean:
@echo Cleaning sqlite3
ifeq (posix,$(SHELLTYPE))
$(SILENT) rm -f $(TARGET)
$(SILENT) rm -rf $(OBJDIR)
else
$(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET))
$(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR))
endif
prebuild:
$(PREBUILDCMDS)
prelink:
$(PRELINKCMDS)
ifneq (,$(PCH))
$(GCH): $(PCH)
@echo $(notdir $<)
-$(SILENT) cp $< $(OBJDIR)
$(SILENT) $(CXX) $(CXXFLAGS) -o "$@" -c "$<"
endif
$(OBJDIR)/sqlite3.o: ../../ocgcore/sqlite3.c
@echo $(notdir $<)
$(SILENT) $(CC) $(CFLAGS) -o "$@" -c "$<"
-include $(OBJECTS:%.o=%.d)
......@@ -8,11 +8,13 @@ public class LAZYsetting : MonoBehaviour {
public UISlider sliderAlpha;
public UIPopupList showoffATK;
public UIPopupList showoffStar;
public UIPopupList LimFPS;
public UIToggle mouseEffect;
public UIToggle closeUp;
public UIToggle showoff;
public UIToggle showoffWhenActived;
public UIToggle cloud;
public UIToggle cloud;
public UIToggle autoPicDownload;
public UIToggle Vbattle;
public UIToggle Vmove;
public UIToggle Vchain;
......
......@@ -111,32 +111,32 @@ public class gameInfo : MonoBehaviour
me.transform.localScale = ks;
if (!swaped)
{
opponent.transform.localPosition = new Vector3(Screen.width / 2-14, Screen.height / 2 - 14);
opponent.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14);
me.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14 - k * (float)(opponent.under.height));
}
else
{
me.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14);
opponent.transform.localPosition = new Vector3(Screen.width / 2-14, Screen.height / 2 - 14 - k * (float)(opponent.under.height));
opponent.transform.localPosition = new Vector3(Screen.width / 2 - 14, Screen.height / 2 - 14 - k * (float)(opponent.under.height));
}
float height = 132 + 50 * (HashedButtons.Count);
if (HashedButtons.Count==0)
float height = 198 + 75 * (HashedButtons.Count);
if (HashedButtons.Count == 0)
{
height = 116;
height = 174;
}
width = (150 * kb) + 15f;
float localPositionPanX = (((float)Screen.width - 150 * kb) / 2) - 15f;
width = (225 * kb) + 15f;
float localPositionPanX = (((float)Screen.width - 225 * kb) / 2) - 15f;
float localPositionPanY = 0;
float localPositionPanY_ = instance_btnPan.transform.localPosition.y + (localPositionPanY - instance_btnPan.transform.localPosition.y) * 0.2f;
instance_btnPan.height += (int)(((float)height - (float)instance_btnPan.height) * 0.2f);
instance_btnPan.transform.localPosition = new Vector3(localPositionPanX, localPositionPanY_, 0);
instance_lab.transform.localPosition = new Vector3(Screen.width/2-315, -Screen.height / 2+90, 0);
instance_lab.transform.localPosition = new Vector3(Screen.width/ 2 - 315, -Screen.height / 2 + 90, 0);
for (int i = 0; i < HashedButtons.Count; i++)
{
if (HashedButtons[i].gameObject != null)
{
HashedButtons[i].gameObject.transform.localPosition += (new Vector3(0, height / 2 - 142 - i * 50, 0) - HashedButtons[i].gameObject.transform.localPosition) * Program.deltaTime * 10f;
HashedButtons[i].gameObject.transform.localPosition += (new Vector3(0, height / 2 - 220 - i * 75, 0) - HashedButtons[i].gameObject.transform.localPosition) * Program.deltaTime * 10f;
}
}
if (Program.TimePassed() - lastTickTime > 1000)
......@@ -285,7 +285,7 @@ public class gameInfo : MonoBehaviour
}
public void setTimeStill(int player)
public void setTimeStill(int player)
{
time[0] = Program.I().ocgcore.timeLimit;
time[1] = Program.I().ocgcore.timeLimit;
......
......@@ -118,7 +118,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 175034}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -4498.624, y: -3107.0017, z: 1654.8652}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 432476}
......
fileFormatVersion: 2
guid: 3864e99f2f589604c814a445bdd634f3
timeCreated: 1552876025
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings: {}
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4288e383ed17c8c4a93d8d3a1395dafd
folderAsset: yes
timeCreated: 1526538476
timeCreated: 1552532408
licenseType: Free
DefaultImporter:
userData:
......
fileFormatVersion: 2
guid: aef8232f55cbd1047a2deb17e26e6954
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b239dae2c69e9d343b643aff82a88018
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 87043a70faf97f64a9db958e91753265
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4f2e738b5c0ae8c4b9e3d56f74029d94
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 4c10598062941c7429fdaf5865f044c2
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b3724736c076f004691474252559d4e7
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 38c7901902db6c74492d62c86a4116de
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 7750a88bad48ad8408327537873862b8
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 7c7eafa856fa69c44aba0be3caaa499e
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: dc0b19faee67dbc4ba1bd21ab48df6c2
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 43a86c0ae23b91a459b1efee56f61c7f
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: b4e9b53de51821f419946fa748a1aab2
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 7b03720a9eb1fe643a1cccf5931348cb
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 97d56be7e31d1b64dbe5953593ce0883
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 7fe10b07822ea03408a11e89d4a00794
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2fe9545453d426048ab6e51496f5ae89
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 3e9b3dc47947d2f40be5f19b6f2a482d
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: edc855649c025274fa2a80a2c9b93337
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: ARMv7
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: eff93f730b327d447a926733335b0170
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8e238f265f0ae2343b876a6aa5955356
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 0beac2d1a97bd3b489885d6dd33f167a
timeCreated: 1552877170
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 42a76ff1ebf90a04780fd82b6534cfb3
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 77818a6b78a576146a7f89a84c5a8dd6
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e8d6fd0631ad6a645a2906aa31cb4bc6
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: a019bf833d3139e40940a0a7e103a8c0
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 8906c6f485cb0ee478bedae166a93275
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 42872ef8cdf781e4db2c2015938c39f7
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9118b2e604c617a41b22161dde0ba02a
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 1dcd054fdaf87654992e0ec0b86ffd7a
timeCreated: 1552877170
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: e8dfe59a0e1cf5c4e99d47d5ed653d73
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 314d5ba7134b3ab4e9afbdb088b6a2a5
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: d0f8b4626ec317c45acb91f4f9cfd5db
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 2b96fdee7ae05e247b15401ce17c0278
timeCreated: 1552877170
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 31c4e56e58457c047969d8e987b2835b
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 9c37308f252a30949a945dbf03acfb3d
timeCreated: 1552877172
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: 387b4a03f7a0abb4d8f063a5f1dde215
timeCreated: 1552877171
licenseType: Free
PluginImporter:
serializedVersion: 2
iconMap: {}
executionOrder: {}
isPreloaded: 0
isOverridable: 0
platformData:
data:
first:
Android: Android
second:
enabled: 1
settings:
CPU: x86
data:
first:
Any:
second:
enabled: 0
settings: {}
data:
first:
Editor: Editor
second:
enabled: 0
settings:
DefaultValueInitialized: true
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.IO;
public class AppLanguage
{
public static string CN = "/zh-CN"; //简体中文(中国) ChineseSimplified
public static string TW = "/zh-TW"; //繁体中文(台湾) ChineseTraditional
public static string Chinese = "/Chinese"; //汉语
public static string US = "/en-US"; //英语(美国) English
public static string FR = "/fr-FR"; //法语(法国) French
public static string DE = "/de-DE"; //德语(德国) German
public static string IT = "/it-IT"; //意大利语(意大利) Italian
public static string JP = "/ja-JP"; //日语(日本) Japanese
public static string KR = "/ko-KR"; //韩语(韩国) Korean
public static string ES = "/es-ES"; //西班牙语(西班牙) Spanish
public static string Null = ""; //Unknown
//public static string Null = "en-WW"; //English
/*public static string LanguageDir()
{
if (Application.systemLanguage == SystemLanguage.ChineseSimplified) { //可能无法识别
return CN; //中文简体
} else if (Application.systemLanguage == SystemLanguage.ChineseTraditional) {//可能无法识别
return TW; //中文繁體
} else if (Application.systemLanguage == SystemLanguage.Chinese) {
return CN; //中文
} else if (Application.systemLanguage == SystemLanguage.English) {
return US; //English
} else if (Application.systemLanguage == SystemLanguage.French) {
return FR; //Français
} else if (Application.systemLanguage == SystemLanguage.German) {
return DE; //Deutsch
} else if (Application.systemLanguage == SystemLanguage.Italian) {
return IT; //Italiano
} else if (Application.systemLanguage == SystemLanguage.Japanese) {
return JP; //日本語
} else if (Application.systemLanguage == SystemLanguage.Korean) {
return KR; //한국어
} else if (Application.systemLanguage == SystemLanguage.Spanish) {
return ES; //Español
} else {
return Null;
}
}*/
public static string LanguageDir()
{
if (Application.systemLanguage == SystemLanguage.ChineseSimplified) { //可能无法识别
if (Directory.Exists("cdb/zh-CN") && Directory.Exists("config/zh-CN")) {
return CN; //中文简体
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.ChineseTraditional) {//可能无法识别
if (Directory.Exists("cdb/zh-TW") && Directory.Exists("config/zh-TW")) {
return TW; //中文繁體
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Chinese) {
if (Directory.Exists("cdb/Chinese") && Directory.Exists("config/Chinese")) {
return Chinese; //汉语
} else if (Directory.Exists("cdb/zh-CN") && Directory.Exists("config/zh-CN")) {
return CN; //中文简体
} else if (Directory.Exists("cdb/zh-TW") && Directory.Exists("config/zh-TW")) {
return TW; //中文繁體
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.English) {
if (Directory.Exists("cdb/en-US") && Directory.Exists("config/en-US")) {
return US; //English
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.French) {
if (Directory.Exists("cdb/fr-FR") && Directory.Exists("config/fr-FR")) {
return FR; //Français
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.German) {
if (Directory.Exists("cdb/de-DE") && Directory.Exists("config/de-DE")) {
return DE; //Deutsch
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Italian) {
if (Directory.Exists("cdb/it-IT") && Directory.Exists("config/it-IT")) {
return IT; //Italiano
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Japanese) {
if (Directory.Exists("cdb/ja-JP") && Directory.Exists("config/ja-JP")) {
return JP; //日本語
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Korean) {
if (Directory.Exists("cdb/ko-KR") && Directory.Exists("config/ko-KR")) {
return KR; //한국어
} else {
return Null;
}
} else if (Application.systemLanguage == SystemLanguage.Spanish) {
if (Directory.Exists("cdb/es-ES") && Directory.Exists("config/es-ES")) {
return ES; //Español
} else {
return Null;
}
} else {
return Null;
}
}
}
\ No newline at end of file
......@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.IO;
public static class Config
{
public static uint ClientVersion = 0x1348;
public static uint ClientVersion = 0x1349;
class oneString
{
......
......@@ -21,6 +21,8 @@ public class Menu : WindowServantSP
UIHelper.registEvent(gameObject, "single_", onClickPizzle);
//UIHelper.registEvent(gameObject, "ai_", onClickAI);
UIHelper.registEvent(gameObject, "exit_", onClickExit);
UIHelper.registEvent(gameObject, "joinQQ_", onClickJoinQQ);
UIHelper.registEvent(gameObject, "download_", onClickDownload);
//(new Thread(up)).Start();
}
......@@ -126,6 +128,36 @@ public class Menu : WindowServantSP
Program.I().shiftToServant(Program.I().selectDeck);
}
void onClickJoinQQ()
{
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
Application.OpenURL("https://jq.qq.com/?_wv=1027&k=50MZVQA");
#elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
jo.Call("doJoinQQGroup", "UHm3h3hSrmgp-iYqMiZcc2zO5J1Q8OyW");
#endif
}
void onClickDownload()
{
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
Application.OpenURL("https://github.com/Unicorn369/pro2_android_closeup/releases/tag/1.0");
#elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
if (!File.Exists("updates/closeup_version1.1.txt")) {//用于检查更新
if (File.Exists("closeup_version1.1.zip")) {//如果有则直接解压
jo.Call("doExtractZipFile", "closeup_version1.1.zip", Program.ANDROID_GAME_PATH);
} else if (File.Exists("updates/closeup_version1.0.txt")){//如果有则下载更新包
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/up_closeup_version1.1.zip");
} else {//否则下载并解压,锁定目录:ANDROID_GAME_PATH
jo.Call("doDownloadZipFile", "https://github.com/Unicorn369/pro2_android_closeup/releases/download/1.0/closeup_version1.1.zip");
}
} else {
jo.Call("showToast", "已下载,无需再次下载!");
}
#endif
}
public static void deleteShell()
{
try
......
......@@ -15,6 +15,7 @@ public static class TcpHelper
static NetworkStream networkStream = null;
static bool canjoin = true;
static bool roomListChecking=false;
public static void join(string ipString, string name, string portString, string pswString, string version)
{
......@@ -30,6 +31,14 @@ public static class TcpHelper
Thread t = new Thread(receiver);
t.Start();
CtosMessage_PlayerInfo(name);
if (pswString == "L")
{
roomListChecking = true;
}
else
{
roomListChecking = false;
}
CtosMessage_JoinGame(pswString, version);
}
catch (Exception e)
......@@ -163,6 +172,9 @@ public static class TcpHelper
case YGOSharp.Network.Enums.StocMessage.HsWatchChange:
((Room)Program.I().room).StocMessage_HsWatchChange(r);
break;
case YGOSharp.Network.Enums.StocMessage.RoomList:
((Room)Program.I().room).StocMessage_RoomList(r);
break;
default:
break;
}
......@@ -196,7 +208,11 @@ public static class TcpHelper
{
Program.I().shiftToServant(Program.I().selectServer);
}
Program.I().cardDescription.RMSshow_none(InterString.Get("链接被断开。"));
if (!roomListChecking)
{
Program.I().cardDescription.RMSshow_none(InterString.Get("链接被断开。"));
}
}
else
{
......
......@@ -50,7 +50,7 @@ public static class UIHelper
public static void Flash()
{
FlashWindow(GetProcessWnd(),true);
FlashWindow(GetProcessWnd(), true);
}
public enum RenderingMode
......@@ -104,7 +104,7 @@ public static class UIHelper
}
}
internal static void registEvent(UIButton btn, Action function)
internal static void registEvent(UIButton btn, Action function)
{
if (btn != null)
{
......@@ -120,9 +120,9 @@ public static class UIHelper
}
}
internal static Texture2D[] sliceField(Texture2D textureField_)
internal static Texture2D[] sliceField(Texture2D textureField_)
{
Texture2D textureField = ScaleTexture(textureField_,1024,819);
Texture2D textureField = ScaleTexture(textureField_, 1024, 819);
Texture2D[] returnValue = new Texture2D[3];
returnValue[0] = new Texture2D(textureField.width, textureField.height);
returnValue[1] = new Texture2D(textureField.width, textureField.height);
......@@ -193,7 +193,7 @@ public static class UIHelper
return ptrFileName;
}
public static T getByName<T>(GameObject father,string name) where T:Component
public static T getByName<T>(GameObject father, string name) where T : Component
{
T return_value = null;
var all = father.transform.GetComponentsInChildren<T>();
......@@ -209,7 +209,7 @@ public static class UIHelper
public static void InterGameObject(GameObject father)
{
var all = father.transform.GetComponentsInChildren<UILabel>();
var all = father.transform.GetComponentsInChildren<UILabel>();
for (int i = 0; i < all.Length; i++)
{
if ((all[i].name.Length > 1 && all[i].name[0] == '!') || all[i].name == "yes_" || all[i].name == "no_")
......@@ -217,7 +217,7 @@ public static class UIHelper
all[i].text = InterString.Get(all[i].text);
}
}
}
}
public static GameObject getByName(GameObject father, string name)
{
......@@ -245,7 +245,7 @@ public static class UIHelper
var all = father.transform.GetComponentsInChildren<UILabel>();
for (int i = 0; i < all.Length; i++)
{
if (all[i].name == name
if (all[i].name == name
||
(all[i].transform.parent != null && all[i].transform.parent.name == name)
||
......@@ -298,7 +298,7 @@ public static class UIHelper
}
else
{
Program.DEBUGLOG("NO Lable"+ name);
Program.DEBUGLOG("NO Lable" + name);
}
}
......@@ -313,12 +313,12 @@ public static class UIHelper
return "";
}
public static string[] Split(this string str,string s)
public static string[] Split(this string str, string s)
{
return str.Split(new string[] { s }, StringSplitOptions.RemoveEmptyEntries);
}
public static void registEvent(GameObject father, string name, Action<GameObject, Servant.messageSystemValue> function, Servant.messageSystemValue value,string name2="")
public static void registEvent(GameObject father, string name, Action<GameObject, Servant.messageSystemValue> function, Servant.messageSystemValue value, string name2 = "")
{
UIInput input = getByName<UIInput>(father, name);
if (input != null)
......@@ -377,7 +377,7 @@ public static class UIHelper
public static void registEvent(GameObject father, string name, Action function)
{
UISlider slider = getByName<UISlider>(father, name);
UISlider slider = getByName<UISlider>(father, name);
if (slider != null)
{
MonoDelegate d = slider.gameObject.GetComponent<MonoDelegate>();
......@@ -499,7 +499,7 @@ public static class UIHelper
internal static Vector2 get_hang_lieArry(int v, int[] hangshu)
{
Vector2 return_value = Vector2.zero;
for (int i = 0; i < 4; i++)
for (int i = 0; i < 4; i++)
{
if (v < hangshu[i])
{
......@@ -608,7 +608,7 @@ public static class UIHelper
{
gameObject.GetComponentInChildren<UILabel>().text = p;
}
catch (Exception)
catch (Exception)
{
}
}
......@@ -618,7 +618,7 @@ public static class UIHelper
registEvent(gameObject, gameObject.name, act);
}
internal static void trySetLableTextList(GameObject father,string text)
internal static void trySetLableTextList(GameObject father, string text)
{
try
{
......@@ -649,7 +649,7 @@ public static class UIHelper
internal static void clearITWeen(GameObject gameObject)
{
iTween[] iTweens = gameObject.GetComponents<iTween>();
for (int i=0;i< iTweens.Length;i++)
for (int i = 0; i < iTweens.Length; i++)
{
MonoBehaviour.DestroyImmediate(iTweens[i]);
}
......@@ -667,7 +667,7 @@ public static class UIHelper
{
return_value = left + (right - left) * (float)i / ((float)(count - 1));
}
return return_value;
return return_value;
}
internal static float get_left_right_indexZuo(float v1, float v2, int v3, int count, int v4)
......@@ -775,9 +775,9 @@ public static class UIHelper
return re;
}
}
byte[] buffer= System.Text.Encoding.UTF8.GetBytes(name);
byte[] buffer = System.Text.Encoding.UTF8.GetBytes(name);
int sum = 0;
for (int i=0;i< buffer.Length;i++)
for (int i = 0; i < buffer.Length; i++)
{
sum += buffer[i];
}
......@@ -785,7 +785,7 @@ public static class UIHelper
return Program.I().face.faces[sum];
}
public static Texture2D getTexture2D(string path)
public static Texture2D getTexture2D(string path)
{
Texture2D pic = null;
try
......@@ -812,7 +812,7 @@ public static class UIHelper
}
internal static void shiftButton(UIButton btn,bool enabled)
internal static void shiftButton(UIButton btn, bool enabled)
{
if (enabled)
{
......@@ -842,7 +842,7 @@ public static class UIHelper
//}
}
internal static void shiftUIToggle(UIToggle tog, bool canClick,bool canChange, string hint)
internal static void shiftUIToggle(UIToggle tog, bool canClick, bool canChange, string hint)
{
try
{
......@@ -853,7 +853,7 @@ public static class UIHelper
boxCollider.enabled = canClick;
if (canClick)
{
getByName<UISprite>(tog.gameObject, "Background").color= Color.white;
getByName<UISprite>(tog.gameObject, "Background").color = Color.white;
//getByName<UISprite>(tog.gameObject, "Checkmark").color = Color.white;
}
else
......@@ -870,7 +870,7 @@ public static class UIHelper
internal static string getBufferString(byte[] buffer)
{
string returnValue = "";
foreach (var item in buffer)
foreach (var item in buffer)
{
returnValue += ((int)item).ToString() + ".";
}
......@@ -886,7 +886,7 @@ public static class UIHelper
return s == "1";
}
internal static string fromBoolToString(bool s)
internal static string fromBoolToString(bool s)
{
if (s)
{
......@@ -905,7 +905,7 @@ public static class UIHelper
}
public static int CompareTime(object x, object y)
public static int CompareTime(object x, object y)
{
if (x == null && y == null)
{
......@@ -924,7 +924,7 @@ public static class UIHelper
return yInfo.LastWriteTime.CompareTo(xInfo.LastWriteTime);
}
public static int CompareName(object x, object y)
public static int CompareName(object x, object y)
{
if (x == null && y == null)
{
......@@ -943,9 +943,9 @@ public static class UIHelper
return xInfo.FullName.CompareTo(yInfo.FullName);
}
internal static void playSound(string p, float val)
internal static void playSound(string p, float val)
{
if (Ocgcore.inSkiping)
if (Ocgcore.inSkiping)
{
return;
}
......@@ -963,10 +963,10 @@ public static class UIHelper
return;
}
path = Environment.CurrentDirectory.Replace("\\", "/") + "/" + path;
path = "file:///" + path;
path = new Uri(new Uri("file:///"), path).ToString();
GameObject audio_helper = Program.I().ocgcore.create_s(Program.I().mod_audio_effect);
audio_helper.GetComponent<audio_helper>().play(path, Program.I().setting.soundValue());
Program.I().destroy(audio_helper,5f);
Program.I().destroy(audio_helper, 5f);
}
internal static string getGPSstringLocation(GPS p1)
......@@ -1068,24 +1068,24 @@ public static class UIHelper
return res;
}
internal static string getSuperName(string name,int code)
internal static string getSuperName(string name, int code)
{
string res = "";
res = "[url=" + code.ToString() + "][u]" + name + "[/u][/url]";
return res;
}
internal static string getDName(string name, int code)
internal static string getDName(string name, int code)
{
string res = "";
res = "「[url=" + code.ToString() + "][u]" + name + "[/u][/url]」";
return res;
}
internal static float getScreenDistance(GameObject a,GameObject b)
internal static float getScreenDistance(GameObject a, GameObject b)
{
Vector3 sa = Program.camera_game_main.WorldToScreenPoint(a.transform.position);sa.z = 0;
Vector3 sb = Program.camera_game_main.WorldToScreenPoint(b.transform.position);sb.z = 0;
Vector3 sa = Program.camera_game_main.WorldToScreenPoint(a.transform.position); sa.z = 0;
Vector3 sb = Program.camera_game_main.WorldToScreenPoint(b.transform.position); sb.z = 0;
return Vector3.Distance(sa, sb);
}
......
......@@ -15,7 +15,7 @@ public class GameField : OCGobject
Transform p_hole_opl = null;
Transform p_hole_mer = null;
Transform p_hole_opr = null;
public phaser Phase = null;
public phaser Phase = null;
public bool mePHole = false;
public bool opPHole = false;
......@@ -55,8 +55,8 @@ public class GameField : OCGobject
Program.I().ocgcore.sendReturn(m.get());
}
public int retOfMp = -1;
void onMP()
public int retOfMp = -1;
void onMP()
{
var m = new BinaryMaster();
m.writer.Write(retOfMp);
......@@ -244,8 +244,8 @@ public class GameField : OCGobject
public void Update()
{
delat = ((isLong ? (40f + 60f * ((1.21f - Program.fieldSize) / 0.21f)) :0f))/110f*5f;
fieldSprite_height += ((isLong ? (819f + 40f + 60f * ((1.21f-Program.fieldSize) / 0.21f)) : 819f) - fieldSprite_height) * (Program.deltaTime * 4);
delat = ((isLong ? (40f + 60f * ((1.21f - Program.fieldSize) / 0.21f)) : 0f)) / 110f * 5f;
fieldSprite_height += ((isLong ? (819f + 40f + 60f * ((1.21f - Program.fieldSize) / 0.21f)) : 819f) - fieldSprite_height) * (Program.deltaTime * 4);
midT.height = (int)fieldSprite_height;
Vector3 position = midT.gameObject.transform.localPosition;
......@@ -400,7 +400,7 @@ public class GameField : OCGobject
}
private static void relocateTextMesh(TMPro.TextMeshPro obj, uint con, game_location loc,Vector3 poi)
private static void relocateTextMesh(TMPro.TextMeshPro obj, uint con, game_location loc, Vector3 poi)
{
obj.transform.position = UIHelper.getCamGoodPosition(Program.I().ocgcore.get_point_worldposition(new GPS
{
......@@ -422,30 +422,30 @@ public class GameField : OCGobject
fieldCode[player] = code;
if (code > 0)
{
Texture2D tex;
if (File.Exists("picture/field/" + code.ToString() + ".png"))
Texture2D tex = null;
if (File.Exists("picture/field/" + code.ToString() + ".png"))
{
tex = UIHelper.getTexture2D("picture/field/" + code.ToString() + ".png");
}
else if (File.Exists("expansions/pics/field/" + code.ToString() + ".png"))
else if (File.Exists("expansions/pics/field/" + code.ToString() + ".png"))
{
tex = UIHelper.getTexture2D("expansions/pics/field/" + code.ToString() + ".png");
}
else if (File.Exists("expansions/pics/field/" + code.ToString() + ".jpg"))
else if (File.Exists("pics/field/" + code.ToString() + ".png"))
{
tex = UIHelper.getTexture2D("expansions/pics/field/" + code.ToString() + ".jpg");
tex = UIHelper.getTexture2D("pics/field/" + code.ToString() + ".png");
}
else if (File.Exists("pics/field/" + code.ToString() + ".png"))
else if (File.Exists("picture/field/" + code.ToString() + ".jpg"))
{
tex = UIHelper.getTexture2D("pics/field/" + code.ToString() + ".png");
tex = UIHelper.getTexture2D("picture/field/" + code.ToString() + ".jpg");
}
else if (File.Exists("pics/field/" + code.ToString() + ".jpg"))
else if (File.Exists("expansions/pics/field/" + code.ToString() + ".jpg"))
{
tex = UIHelper.getTexture2D("pics/field/" + code.ToString() + ".jpg");
tex = UIHelper.getTexture2D("expansions/pics/field/" + code.ToString() + ".jpg");
}
else
{
tex = UIHelper.getTexture2D("picture/field/" + code.ToString() + ".jpg");
tex = UIHelper.getTexture2D("pics/field/" + code.ToString() + ".jpg");
}
if (tex != null)
{
......@@ -488,7 +488,7 @@ public class GameField : OCGobject
}
}
public void shiftBlackHole(bool on,Vector3 v=default(Vector3))
public void shiftBlackHole(bool on, Vector3 v = default(Vector3))
{
if (on)
{
......@@ -533,17 +533,17 @@ public class GameField : OCGobject
}
GameObject big_string;
public void animation_show_big_string(Texture2D tex,bool only=false)
public void animation_show_big_string(Texture2D tex, bool only = false)
{
if (Ocgcore.inSkiping)
if (Ocgcore.inSkiping)
{
return;
}
if (only)
if (only)
{
destroy(big_string);
}
big_string = create(Program.I().New_phase,Program.I().ocgcore.centre(),Vector3.zero,false,Program.ui_main_2d,true,new Vector3(Screen.height / 1000f* Program.fieldSize, Screen.height / 1000f * Program.fieldSize, Screen.height / 1000f * Program.fieldSize));
big_string = create(Program.I().New_phase, Program.I().ocgcore.centre(), Vector3.zero, false, Program.ui_main_2d, true, new Vector3(Screen.height / 1000f * Program.fieldSize, Screen.height / 1000f * Program.fieldSize, Screen.height / 1000f * Program.fieldSize));
big_string.GetComponentInChildren<UITexture>().mainTexture = tex;
Program.I().ocgcore.Sleep(40);
big_string.AddComponent<animation_screen_lock2>();
......@@ -642,7 +642,7 @@ public class GameField : OCGobject
{
p = gps,
position = Program.I().ocgcore.get_point_worldposition(gps)
};
field_disabled_containers.Add(container);
}
......@@ -658,7 +658,7 @@ public class GameField : OCGobject
public void realize()
{
if (Phase.colliderBp.enabled)
if (Phase.colliderBp.enabled)
{
Phase.labBp.gradientTop = Color.white;
}
......@@ -706,13 +706,13 @@ public class GameField : OCGobject
Phase.labEp.gradientTop = Color.green;
break;
}
for (int i = 0; i < field_disabled_containers.Count; i++)
for (int i = 0; i < field_disabled_containers.Count; i++)
{
if (field_disabled_containers[i].disabled)
{
if (field_disabled_containers[i].game_object == null)
{
field_disabled_containers[i].game_object = create(Program.I().mod_simple_quad, field_disabled_containers[i].position,new Vector3(90,0,0),false,null,true);
field_disabled_containers[i].game_object = create(Program.I().mod_simple_quad, field_disabled_containers[i].position, new Vector3(90, 0, 0), false, null, true);
field_disabled_containers[i].game_object.transform.localScale = Vector3.zero;
iTween.ScaleTo(field_disabled_containers[i].game_object, new Vector3(4, 4, 4), 1f);
field_disabled_containers[i].game_object.GetComponent<Renderer>().material.mainTexture = GameTextureManager.negated;
......@@ -720,7 +720,7 @@ public class GameField : OCGobject
}
else
{
destroy(field_disabled_containers[i].game_object,0.6f,true,true);
destroy(field_disabled_containers[i].game_object, 0.6f, true, true);
}
}
......
......@@ -739,6 +739,7 @@ public class Ocgcore : ServantWithCardDescription
public void onHome()
{
Program.I().SaveConfig();
returnTo();
}
......@@ -1315,6 +1316,7 @@ public class Ocgcore : ServantWithCardDescription
isFirst = ((playertype & 0xf) > 0) ? false : true;
gameInfo.swaped = false;
isObserver = ((playertype & 0xf0) > 0) ? true : false;
r.ReadByte(); // duel_rule
life_0 = r.ReadInt32();
life_1 = r.ReadInt32();
lpLimit = life_0;
......
This diff is collapsed.
......@@ -123,16 +123,16 @@ public class GameStringHelper
switch(card.Ot)
{
case 1:
limitot = "[OCG] ";
limitot = GameStringManager.get_unsafe(1240);
break;
case 2:
limitot = "[TCG] ";
limitot = GameStringManager.get_unsafe(1241);
break;
case 3:
limitot = "[OCG/TCG] ";
limitot = GameStringManager.get_unsafe(1242);
break;
case 4:
limitot = "[Anime] ";
limitot = GameStringManager.get_unsafe(1243);
break;
}
string re = "";
......@@ -140,7 +140,7 @@ public class GameStringHelper
{
re += "[b]" + card.Name + "[/b]";
re += "\n";
re += "[sup]" + limitot + "[/sup]";
re += "[sup][" + limitot + "] [/sup]";
re += "\r";
re += "[sup]" + card.Id.ToString() + "[/sup]";
re += "\n";
......
......@@ -15,20 +15,27 @@ public class HttpDldFile
bool flag = false;
try
{
if(!Directory.Exists(Path.GetDirectoryName(filename))){
Directory.CreateDirectory(Path.GetDirectoryName(filename));
}
using (var client = new WebClient())
{
ServicePointManager.ServerCertificateValidationCallback = MyRemoteCertificateValidationCallback;
//client.Headers.Add(HttpRequestHeader.Authorization, string.Concat("token ", RepoData.GetToken()));
client.Headers.Add(HttpRequestHeader.ContentType,"application/x-www-form-urlencoded; charset=UTF-8");
client.Headers.Add(HttpRequestHeader.UserAgent, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36 Edge/15.15063");
client.DownloadFile(new Uri(url), filename+".tmp");
}
flag = true;
if(File.Exists(filename))
if (!Directory.Exists(Path.GetDirectoryName(filename)))
{
Directory.CreateDirectory(Path.GetDirectoryName(filename));
}
using (var client = new TimeoutWebClient())
{
ServicePointManager.ServerCertificateValidationCallback = MyRemoteCertificateValidationCallback;
if (Path.GetExtension(filename).Contains("png"))
{
client.Timeout = 6500;
}
if (Path.GetExtension(filename).Contains("jpg"))
{
client.Timeout = 3500;
}
client.DownloadFile(new Uri(url), filename + ".tmp");
}
flag = true;
if (File.Exists(filename))
{
File.Delete(filename);
}
......@@ -68,5 +75,25 @@ public class HttpDldFile
}
return isOk;
}
}
public class TimeoutWebClient : WebClient
{
public int Timeout { get; set; }
public TimeoutWebClient()
{
Timeout = 10000;
}
public TimeoutWebClient(int timeout)
{
Timeout = timeout;
}
protected override WebRequest GetWebRequest(Uri address)
{
WebRequest request = base.GetWebRequest(address);
request.Timeout = Timeout;
return request;
}
}
\ No newline at end of file
......@@ -2,6 +2,8 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Text.RegularExpressions;
public class Room : WindowServantSP
{
......@@ -284,6 +286,193 @@ public class Room : WindowServantSP
RMSshow_none(result);
}
public void StocMessage_RoomList(BinaryReader r)
{
//requires a dedicated button and a list to show rooms.
short count = BitConverter.ToInt16(r.ReadBytes(2), 0);
string roomname;
string player1 = "";
string player2 = "";
string hoststr=String.Empty;
List<string[]> roomList = new List<string[]>();
for (ushort i = 0; i < count; i++)
{
List<char> chars = new List<char>();
byte[] temp = r.ReadBytes(64);
roomname = Encoding.UTF8.GetString(temp);
roomname = roomname.Trim(new char[] { '\0' });
int room_status = Convert.ToInt16(BitConverter.ToString(r.ReadBytes(1), 0),16);
int room_duel_count = Convert.ToInt16(BitConverter.ToString(r.ReadBytes(1), 0),16);
int room_turn_count = Convert.ToInt16(BitConverter.ToString(r.ReadBytes(1), 0), 16);
temp = r.ReadBytes(128);
player1 = Encoding.UTF8.GetString(temp);
player1 = player1.Trim(new char[] { '\0' });
int player1_score = Convert.ToInt16(BitConverter.ToString(r.ReadBytes(1), 0));
int player1_lp = BitConverter.ToInt32(r.ReadBytes(4), 0);
temp = r.ReadBytes(128);
player2 = Encoding.UTF8.GetString(temp);
player2 = player2.Trim(new char[] { '\0' });
int player2_score = Convert.ToInt16(BitConverter.ToString(r.ReadBytes(1), 0));
int player2_lp = BitConverter.ToInt32(r.ReadBytes(4), 0);
if (room_status == 0)
{
player1 = player1.Replace("???", " ");
player2 = player2.Replace("???", " ");
}
string roomTag = RoomNameFormatter(roomname);
string[] strings = new string[]
{
room_duel_count.ToString(),
room_turn_count.ToString(),
roomname,
player1_score.ToString(),
player1_lp.ToString(),
player1,
player2,
player2_score.ToString(),
player2_lp.ToString(),
hoststr,
room_status.ToString(),
roomTag
};
switch (room_status)
{
case 0:
{
hoststr = "[EFD334][未开始][FFFFFF] " + strings[11] +"[FFFFFF]"+ strings[5] + " VS " + strings[6];
break;
}
case 1:
{
hoststr = "[A978ED][G:" + strings[0] + ",T:" + strings[1] + "][FFFFFF] " + strings[11] +"[FFFFFF]" + strings[5] + " VS " + strings[6];
break;
}
case 2:
{
hoststr = "[A978ED][G:" + strings[0] + ",Siding][FFFFFF] " + strings[11] + "[FFFFFF]" + strings[5] + " VS " + strings[6];
break;
}
default:
{
hoststr = String.Empty;
break;
}
}
strings[9] = hoststr;
roomList.Add(strings);
}
Program.I().roomList.UpdateList(roomList);
//Do something with the roomList.
}
string RoomNameFormatter(string roomname)
{
string roomTag=String.Empty;
List<string> tags = new List<string>();
if (Regex.IsMatch(roomname, @"^S,RANDOM#\d{1,}"))
{
roomTag = "[8AE57E][Duel] ";
return roomTag;
}
else if(Regex.IsMatch(roomname, @"^M,RANDOM#\d{1,}"))
{
roomTag = "[42C1EC][Match] ";
return roomTag;
}
else if(Regex.IsMatch(roomname, @"^AI#\S{0,},\d{1,}")|| Regex.IsMatch(roomname, @"^AI\S{0,}#\d{1,}"))
{
roomTag = "[5E71FF][AI] ";
return roomTag;
}
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}NF[,#])?(?(1)|(^NF[#,]))"))
{
tags.Add("[C63111][No Banlist] ");
}
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}LF\d[,#])?(?(1)|(^LF\d[#,]))"))
{
int banlist = (int)char.GetNumericValue(roomname[roomname.LastIndexOf("LF") + 2]);
YGOSharp.Banlist blist = YGOSharp.BanlistManager.Banlists[banlist - 1];
tags.Add("[DDDDAA][" + blist.Name + "]");
}
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}OO[,#])?(?(1)|(^OO[#,]))"))
{
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}OT[,#])?(?(1)|(^OT[#,]))"))
{
tags.Add("[11C69C][TCG/OCG]");
}
else
{
tags.Add("[B62FB2][OCG]");
}
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}S[,#])?(?(1)|(^S[#,]))"))
{
tags.Add("[8AE57E][Duel] ");
}
else if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}M[,#])?(?(1)|(^M[#,]))"))
{
tags.Add("[42C1EC][Match] ");
}
else if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}T[,#])?(?(1)|(^T[#,]))"))
{
tags.Add("[D14291][TAG] ");
}
}
else if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}TO[,#])?(?(1)|(^TO[#,]))"))
{
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}OT[,#])?(?(1)|(^OT[#,]))"))
{
tags.Add("[11C69C][TCG/OCG]");
}
else
{
tags.Add("[F58637][TCG]");
}
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}S[,#])?(?(1)|(^S[#,]))"))
{
tags.Add("[8AE57E][Duel] ");
}
else if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}M[,#])?(?(1)|(^M[#,]))"))
{
tags.Add("[42C1EC][Match] ");
}
else if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}T[,#])?(?(1)|(^T[#,]))"))
{
tags.Add("[D14291][TAG] ");
}
}
else
{
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}T[,#])?(?(1)|(^T[#,]))"))
{
tags.Add("[D14291][TAG]");
}
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}M[,#])?(?(1)|(^M[#,]))"))
{
tags.Add("[42C1EC][Match]");
}
if (Regex.IsMatch(roomname, @"(\w{1,}[,^]{1}S[,#])?(?(1)|(^S[#,]))")){
tags.Add("[8AE57E][Duel]");
}
}
roomTag = String.Join("", tags.ToArray())+" ";
if (roomTag == " ")
{
roomTag ="[ "+roomname+" ] ";
}
if (roomTag.Length > 150)
{
roomTag = "[CUSTOM] ";
}
return roomTag;
}
public void StocMessage_Replay(BinaryReader r)
{
byte[] data = r.ReadToEnd();
......
using System;
using System.Collections.Generic;
using System.Linq;
public class RoomList : WindowServantSP
{
UIselectableList superScrollView = null;
List<string[]> listOfRooms = new List<string[]>();
bool hideAI;
bool hideStarted;
UILabel roomPSWLabel;
public override void initialize()
{
createWindow(Program.I().new_ui_RoomList);
UIHelper.registEvent(gameObject, "exit_", onClickExit);
UIHelper.registEvent(gameObject, "refresh_", onRefresh);
roomPSWLabel = UIHelper.getByName<UILabel>(gameObject, "roomNameLabel");
hideAI =UIHelper.getByName<UIToggle>(gameObject, "hideAIrooms_").value = UIHelper.fromStringToBool(Config.Get("hideAIrooms_", "1"));
hideStarted=UIHelper.getByName<UIToggle>(gameObject, "hideStarted_").value = UIHelper.fromStringToBool(Config.Get("hideStarted_", "1"));
UIHelper.registEvent(gameObject, "hideAIrooms_", save);
UIHelper.registEvent(gameObject, "hideStarted_", save);
superScrollView = gameObject.GetComponentInChildren<UIselectableList>();
superScrollView.selectedAction = onSelected;
superScrollView.install();
SetActiveFalse();
}
private void save()
{
hideAI = UIHelper.getByName<UIToggle>(gameObject, "hideAIrooms_").value;
hideStarted = UIHelper.getByName<UIToggle>(gameObject, "hideStarted_").value;
Config.Set("hideAIrooms_", UIHelper.fromBoolToString(UIHelper.getByName<UIToggle>(gameObject, "hideAIrooms_").value));
Config.Set("hideStarted_", UIHelper.fromBoolToString(UIHelper.getByName<UIToggle>(gameObject, "hideStarted_").value));
}
private void onRefresh()
{
Program.I().selectServer.onClickRoomList();
}
public void UpdateList(List<string[]> roomList)
{
show();
listOfRooms.Clear();
listOfRooms.AddRange(roomList);
printFile();
}
public void onClickExit()
{
hide();
}
public override void hide()
{
roomPSWLabel.text = "";
base.hide();
}
private void printFile()
{
superScrollView.clear();
superScrollView.toTop();
if (hideAI)
{
listOfRooms.RemoveAll(s => s[11].Contains("AI"));
}
if (hideStarted)
{
listOfRooms.RemoveAll(s => Convert.ToInt32(s[10]) != 0);
}
listOfRooms.TrimExcess();
listOfRooms = listOfRooms.OrderBy(s => s[3]).ToList();
foreach (string[] room in listOfRooms)
{
superScrollView.add(room[9]);
}
}
string selectedString = string.Empty;
void onSelected()
{
if (!isShowed)
{
return;
}
string roomPsw;
if (selectedString == superScrollView.selectedString)
{
roomPsw= listOfRooms.Find(s => s[9] == selectedString)[2];
JoinRoom(superScrollView.selectedString,roomPsw);
return;
}
selectedString = superScrollView.selectedString;
roomPsw= listOfRooms.Find(s => s[9] == selectedString)[2];
if (roomPsw != null)
{
roomPSWLabel.text = roomPsw;
}
else
{
roomPSWLabel.text = "";
}
}
void JoinRoom(string selectedString,string roomPsw)
{
string Name = UIHelper.getByName<UIInput>(Program.I().selectServer.gameObject, "name_").value;
string ipString = UIHelper.getByName<UIInput>(Program.I().selectServer.gameObject, "ip_").value;
string portString = UIHelper.getByName<UIInput>(Program.I().selectServer.gameObject, "port_").value;
string pswString = roomPsw;
string versionString = UIHelper.getByName<UIInput>(Program.I().selectServer.gameObject, "version_").value;
if (versionString == "")
{
UIHelper.getByName<UIInput>(Program.I().selectServer.gameObject, "version_").value = "0x1348";
versionString = "0x1348";
}
Program.I().roomList.hide();
Program.I().selectServer.KF_onlineGame(Name, ipString, portString, versionString, pswString);
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 4778973ded4d5c445b9ca998391a2c29
timeCreated: 1538811664
guid: 3dc3c230506cd4f409746edaac651b29
timeCreated: 1551335384
licenseType: Free
MonoImporter:
serializedVersion: 2
......
......@@ -241,7 +241,17 @@ public class selectDeck : WindowServantSP
string path = "deck/" + superScrollView.selectedString + ".ydk";
if (File.Exists(path))
{
#if UNITY_EDITOR || UNITY_STANDALONE_WIN //编译器、Windows
System.Diagnostics.Process.Start("notepad.exe", path);
#elif UNITY_STANDALONE_OSX //Mac OS X
System.Diagnostics.Process.Start("open", "-e " + path);
#elif UNITY_STANDALONE_LINUX //Linux
System.Diagnostics.Process.Start("gedit", path);
#elif UNITY_ANDROID //Android
AndroidJavaObject jo = new AndroidJavaObject("cn.unicorn369.library.API");
jo.Call("openFile", Program.ANDROID_GAME_PATH + path);
//#elif UNITY_IPHONE //iPhone
#endif
}
}
......
......@@ -24,7 +24,7 @@ public class Setting : WindowServant2D
UIHelper.getByName<UIToggle>(gameObject, "handmPosition_").value = UIHelper.fromStringToBool(Config.Get("handmPosition_", "0"));
UIHelper.getByName<UIToggle>(gameObject, "spyer_").value = UIHelper.fromStringToBool(Config.Get("spyer_", "1"));
UIHelper.getByName<UIToggle>(gameObject, "resize_").value = UIHelper.fromStringToBool(Config.Get("resize_", "0"));
if (QualitySettings.GetQualityLevel()<3)
if (QualitySettings.GetQualityLevel() < 3)
{
UIHelper.getByName<UIToggle>(gameObject, "high_").value = false;
}
......@@ -46,13 +46,13 @@ public class Setting : WindowServant2D
sliderSize = UIHelper.getByName<UISlider>(gameObject, "size_");
sliderAlpha = UIHelper.getByName<UISlider>(gameObject, "alpha_");
sliderVsize = UIHelper.getByName<UISlider>(gameObject, "vSize_");
Program.go(2000,readVales);
Program.go(2000, readVales);
var collection = gameObject.GetComponentsInChildren<UIToggle>();
for (int i = 0; i < collection.Length; i++)
{
if (collection[i].name.Length > 0 && collection[i].name[0] == '*')
{
if (collection[i].name== "*mouseParticle" || collection[i].name == "*showOff" || collection[i].name == "*Efield")
if (collection[i].name == "*mouseParticle" || collection[i].name == "*showOff" || collection[i].name == "*Efield")
{
collection[i].value = UIHelper.fromStringToBool(Config.Get(collection[i].name, "1"));
}
......@@ -62,13 +62,16 @@ public class Setting : WindowServant2D
}
}
}
setting.showoffATK.value = Config.Get("showoffATK","1800");
setting.showoffATK.value = Config.Get("showoffATK", "1800");
setting.showoffStar.value = Config.Get("showoffStar", "5");
setting.LimFPS.value = Config.Get("LimFPS", "60");
UIHelper.registEvent(setting.showoffATK.gameObject, onchangeClose);
UIHelper.registEvent(setting.showoffStar.gameObject, onchangeClose);
UIHelper.registEvent(setting.LimFPS.gameObject, onchangeFPS);
UIHelper.registEvent(setting.mouseEffect.gameObject, onchangeMouse);
UIHelper.registEvent(setting.closeUp.gameObject, onchangeCloseUp);
UIHelper.registEvent(setting.cloud.gameObject, onchangeCloud);
UIHelper.registEvent(setting.cloud.gameObject, onchangeCloud);
UIHelper.registEvent(setting.autoPicDownload.gameObject, onchangeDownload);
UIHelper.registEvent(setting.Vpedium.gameObject, onCP);
UIHelper.registEvent(setting.Vfield.gameObject, onCP);
UIHelper.registEvent(setting.Vlink.gameObject, onCP);
......@@ -76,6 +79,16 @@ public class Setting : WindowServant2D
onchangeCloud();
}
private void onchangeFPS()
{
if (setting.LimFPS.value == "Auto") {
Application.targetFrameRate = -1;
} else {
int FPS = int.Parse(setting.LimFPS.value);
Application.targetFrameRate = FPS;
}
}
private void readVales()
{
try
......@@ -98,6 +111,11 @@ public class Setting : WindowServant2D
Program.MonsterCloud = setting.cloud.value;
}
public void onchangeDownload()
{
GameTextureManager.AutoPicDownload = setting.autoPicDownload.value;
}
public void onchangeMouse()
{
Program.I().mouseParticle.SetActive(setting.mouseEffect.value);
......@@ -115,7 +133,7 @@ public class Setting : WindowServant2D
}
public void onchangeCloseUp()
public void onchangeCloseUp()
{
if (setting.closeUp.value == false)
{
......@@ -177,7 +195,7 @@ public class Setting : WindowServant2D
}
UISlider sliderSize;
void onChangeSize()
void onChangeSize()
{
if (sliderSize != null)
{
......@@ -185,7 +203,7 @@ public class Setting : WindowServant2D
}
}
public float vol()
public float vol()
{
return UIHelper.getByName<UISlider>(gameObject, "vol_").value;
}
......@@ -197,6 +215,7 @@ public class Setting : WindowServant2D
void onClickExit()
{
Program.I().SaveConfig();
hide();
}
......@@ -217,7 +236,7 @@ public class Setting : WindowServant2D
Config.Set("vSize_", ((int)(UIHelper.getByName<UISlider>(gameObject, "vSize_").value * 1000)).ToString());
Config.Set("alpha_", ((int)(UIHelper.getByName<UISlider>(gameObject, "alpha_").value * 1000)).ToString());
var collection = gameObject.GetComponentsInChildren<UIToggle>();
for (int i = 0; i < collection.Length; i++)
for (int i = 0; i < collection.Length; i++)
{
if (collection[i].name.Length > 0 && collection[i].name[0] == '*')
{
......@@ -226,12 +245,13 @@ public class Setting : WindowServant2D
}
Config.Set("showoffATK", setting.showoffATK.value.ToString());
Config.Set("showoffStar", setting.showoffStar.value.ToString());
Config.Set("LimFPS", setting.LimFPS.value.ToString());
Config.Set("resize_", UIHelper.fromBoolToString(UIHelper.getByName<UIToggle>(gameObject, "resize_").value));
}
public void save()
{
Config.Set("ignoreWatcher_",UIHelper.fromBoolToString(UIHelper.getByName<UIToggle>(gameObject, "ignoreWatcher_").value));
Config.Set("ignoreWatcher_", UIHelper.fromBoolToString(UIHelper.getByName<UIToggle>(gameObject, "ignoreWatcher_").value));
Config.Set("ignoreOP_", UIHelper.fromBoolToString(UIHelper.getByName<UIToggle>(gameObject, "ignoreOP_").value));
Config.Set("smartSelect_", UIHelper.fromBoolToString(UIHelper.getByName<UIToggle>(gameObject, "smartSelect_").value));
Config.Set("autoChain_", UIHelper.fromBoolToString(UIHelper.getByName<UIToggle>(gameObject, "autoChain_").value));
......
......@@ -19,6 +19,7 @@ public class SelectServer : WindowServantSP
UIHelper.registEvent(gameObject, "exit_", onClickExit);
UIHelper.registEvent(gameObject, "face_", onClickFace);
UIHelper.registEvent(gameObject, "join_", onClickJoin);
//UIHelper.registEvent(gameObject, "roomList_", onClickRoomList);
UIHelper.getByName<UIInput>(gameObject, "name_").value = Config.Get("name","一秒一喵机会");
list = UIHelper.getByName<UIPopupList>(gameObject, "history_");
UIHelper.registEvent(gameObject,"history_", onSelected);
......@@ -143,6 +144,25 @@ public class SelectServer : WindowServantSP
string pswString = UIHelper.getByName<UIInput>(gameObject, "psw_").value;
string versionString = UIHelper.getByName<UIInput>(gameObject, "version_").value;
if (versionString=="")
{
UIHelper.getByName<UIInput>(gameObject, "version_").value = "0x1349";
versionString = "0x1349";
}
KF_onlineGame(Name, ipString, portString, versionString, pswString);
}
public void onClickRoomList()
{
if (!isShowed)
{
return;
}
string Name = UIHelper.getByName<UIInput>(gameObject, "name_").value;
string ipString = UIHelper.getByName<UIInput>(gameObject, "ip_").value;
string portString = UIHelper.getByName<UIInput>(gameObject, "port_").value;
string pswString = "L";
string versionString = UIHelper.getByName<UIInput>(gameObject, "version_").value;
if (versionString == "")
{
UIHelper.getByName<UIInput>(gameObject, "version_").value = "0x1348";
versionString = "0x1348";
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment