Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
YGOProUnity_V2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
perfectdicky
YGOProUnity_V2
Commits
82690ab4
Commit
82690ab4
authored
Sep 06, 2021
by
神楽坂玲奈
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mycard avatar
parent
1ff721b4
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
49 additions
and
24 deletions
+49
-24
Assets/ArtSystem/gameInfo/gameInfo.cs
Assets/ArtSystem/gameInfo/gameInfo.cs
+10
-10
Assets/ArtSystem/remaster/lazyPlayer.cs
Assets/ArtSystem/remaster/lazyPlayer.cs
+6
-12
Assets/Scripts/MyCard.cs
Assets/Scripts/MyCard.cs
+26
-0
Assets/Scripts/MyCard.cs.meta
Assets/Scripts/MyCard.cs.meta
+3
-0
Assets/SibylSystem/Room/Room.cs
Assets/SibylSystem/Room/Room.cs
+1
-1
Assets/SibylSystem/Servant.cs
Assets/SibylSystem/Servant.cs
+3
-1
No files found.
Assets/ArtSystem/gameInfo/gameInfo.cs
View file @
82690ab4
using
System
;
using
System.Collections.Generic
;
using
DefaultNamespace
;
using
DG.Tweening
;
using
UnityEngine
;
public
class
gameUIbutton
...
...
@@ -338,18 +340,16 @@ public class gameInfo : MonoBehaviour
((
float
)
Program
.
I
().
ocgcore
.
life_1
>
0
?
Program
.
I
().
ocgcore
.
life_1
:
0
).
ToString
();
me
.
api_name
.
text
=
Program
.
I
().
ocgcore
.
name_0_c
;
opponent
.
api_name
.
text
=
Program
.
I
().
ocgcore
.
name_1_c
;
me
.
api_face
.
mainTexture
=
UIHelper
.
getFace
(
Program
.
I
().
ocgcore
.
name_0_c
);
opponent
.
api_face
.
mainTexture
=
UIHelper
.
getFace
(
Program
.
I
().
ocgcore
.
name_1_c
);
iTween
.
MoveToLocal
(
me
.
api_healthBar
.
gameObject
,
new
Vector3
(
MyCard
.
LoadAvatar
(
Program
.
I
().
ocgcore
.
name_0_c
,
texture
=>
me
.
api_face
.
mainTexture
=
texture
);
MyCard
.
LoadAvatar
(
Program
.
I
().
ocgcore
.
name_1_c
,
texture
=>
opponent
.
api_face
.
mainTexture
=
texture
);
me
.
api_healthBar
.
transform
.
DOLocalMoveX
(
me
.
api_healthBar
.
width
-
getRealLife
(
Program
.
I
().
ocgcore
.
life_0
)
/
Program
.
I
().
ocgcore
.
lpLimit
*
me
.
api_healthBar
.
width
,
me
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
y
,
me
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
z
),
1f
);
iTween
.
MoveToLocal
(
opponent
.
api_healthBar
.
gameObject
,
new
Vector3
(
me
.
api_healthBar
.
width
,
1f
);
opponent
.
api_healthBar
.
transform
.
DOLocalMoveX
(
opponent
.
api_healthBar
.
width
-
getRealLife
(
Program
.
I
().
ocgcore
.
life_1
)
/
Program
.
I
().
ocgcore
.
lpLimit
*
opponent
.
api_healthBar
.
width
,
opponent
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
y
,
opponent
.
api_healthBar
.
gameObject
.
transform
.
localPosition
.
z
),
1f
);
opponent
.
api_healthBar
.
width
,
1f
);
instance_lab
.
Clear
();
if
(
Program
.
I
().
ocgcore
.
confirmedCards
.
Count
>
0
)
instance_lab
.
Add
(
GameStringHelper
.
yijingqueren
);
foreach
(
var
item
in
Program
.
I
().
ocgcore
.
confirmedCards
)
instance_lab
.
Add
(
item
);
...
...
Assets/ArtSystem/remaster/lazyPlayer.cs
View file @
82690ab4
using
System
;
using
DefaultNamespace
;
using
UnityEngine
;
public
class
lazyPlayer
:
MonoBehaviour
...
...
@@ -55,7 +56,7 @@ public class lazyPlayer : MonoBehaviour
setIfMe
(
false
);
SetNotNull
(
false
);
SetIFcanKick
(
false
);
s
etName
(
""
);
S
etName
(
""
);
}
private
void
OnPrepClicked
()
...
...
@@ -126,18 +127,11 @@ public class lazyPlayer : MonoBehaviour
return
mIfMe
;
}
public
void
setName
(
string
name_
)
public
void
SetName
(
string
name
)
{
mName
=
name_
;
UILabel_name
.
text
=
name_
;
try
{
face
.
mainTexture
=
UIHelper
.
getFace
(
name_
);
}
catch
(
Exception
)
{
Debug
.
LogError
(
"setName"
);
}
mName
=
name
;
UILabel_name
.
text
=
name
;
MyCard
.
LoadAvatar
(
name
,
texture
=>
face
.
mainTexture
=
texture
);
}
public
string
getName
()
...
...
Assets/Scripts/MyCard.cs
0 → 100644
View file @
82690ab4
using
System
;
using
UnityEngine
;
using
UnityEngine.Networking
;
namespace
DefaultNamespace
{
public
class
MyCard
{
public
static
void
LoadAvatar
(
string
username
,
Action
<
Texture2D
>
callback
)
{
var
request
=
UnityWebRequestTexture
.
GetTexture
(
$"https://sapi.moecube.com:444/accounts/users/
{
username
}
.png"
);
var
operation
=
request
.
SendWebRequest
();
operation
.
completed
+=
_
=>
{
if
(
request
.
error
!=
null
)
{
Debug
.
LogWarning
(
$"
{
request
.
url
}
:
{
request
.
error
}
"
);
return
;
}
callback
(((
DownloadHandlerTexture
)
request
.
downloadHandler
).
texture
);
};
}
}
}
\ No newline at end of file
Assets/Scripts/MyCard.cs.meta
0 → 100644
View file @
82690ab4
fileFormatVersion: 2
guid: e23192c6a90f4880a6558e4dad535f94
timeCreated: 1630859585
\ No newline at end of file
Assets/SibylSystem/Room/Room.cs
View file @
82690ab4
...
...
@@ -684,7 +684,7 @@ public class Room : WindowServantSP
else
{
realPlayers
[
i
].
SetNotNull
(
true
);
realPlayers
[
i
].
s
etName
(
roomPlayers
[
i
].
name
);
realPlayers
[
i
].
S
etName
(
roomPlayers
[
i
].
name
);
realPlayers
[
i
].
SetIFcanKick
(
is_host
&&
i
!=
selftype
);
realPlayers
[
i
].
setIfMe
(
i
==
selftype
);
realPlayers
[
i
].
setIfprepared
(
roomPlayers
[
i
].
prep
);
...
...
Assets/SibylSystem/Servant.cs
View file @
82690ab4
using
System
;
using
System.Collections.Generic
;
using
DefaultNamespace
;
using
DG.Tweening
;
using
UnityEngine
;
using
UnityEngine.Assertions
;
...
...
@@ -711,7 +712,8 @@ public class Servant
Program
.
I
().
ui_main_2d
);
UIHelper
.
InterGameObject
(
currentMSwindow
);
UIHelper
.
getByName
<
UITexture
>(
currentMSwindow
,
"face_"
).
mainTexture
=
UIHelper
.
getFace
(
name
);
MyCard
.
LoadAvatar
(
name
,
texture
=>
UIHelper
.
getByName
<
UITexture
>(
currentMSwindow
,
"face_"
).
mainTexture
=
texture
);
UIHelper
.
registEvent
(
currentMSwindow
,
"yes_"
,
ES_RMSpremono
,
new
messageSystemValue
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment