v1
5
.vscode/extensions.json
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"visualstudiotoolsforunity.vstuc"
|
||||
]
|
||||
}
|
||||
10
.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Attach to Unity",
|
||||
"type": "vstuc",
|
||||
"request": "attach"
|
||||
}
|
||||
]
|
||||
}
|
||||
106
.vscode/settings.json
vendored
|
|
@ -1,56 +1,56 @@
|
|||
{
|
||||
"files.exclude":
|
||||
{
|
||||
"**/.DS_Store":true,
|
||||
"**/.git":true,
|
||||
"**/.gitmodules":true,
|
||||
"**/*.booproj":true,
|
||||
"**/*.pidb":true,
|
||||
"**/*.suo":true,
|
||||
"**/*.user":true,
|
||||
"**/*.userprefs":true,
|
||||
"**/*.unityproj":true,
|
||||
"**/*.dll":true,
|
||||
"**/*.exe":true,
|
||||
"**/*.pdf":true,
|
||||
"**/*.mid":true,
|
||||
"**/*.midi":true,
|
||||
"**/*.wav":true,
|
||||
"**/*.gif":true,
|
||||
"**/*.ico":true,
|
||||
"**/*.jpg":true,
|
||||
"**/*.jpeg":true,
|
||||
"**/*.png":true,
|
||||
"**/*.psd":true,
|
||||
"**/*.tga":true,
|
||||
"**/*.tif":true,
|
||||
"**/*.tiff":true,
|
||||
"**/*.3ds":true,
|
||||
"**/*.3DS":true,
|
||||
"**/*.fbx":true,
|
||||
"**/*.FBX":true,
|
||||
"**/*.lxo":true,
|
||||
"**/*.LXO":true,
|
||||
"**/*.ma":true,
|
||||
"**/*.MA":true,
|
||||
"**/*.obj":true,
|
||||
"**/*.OBJ":true,
|
||||
"**/*.asset":true,
|
||||
"**/*.cubemap":true,
|
||||
"**/*.flare":true,
|
||||
"**/*.mat":true,
|
||||
"**/*.meta":true,
|
||||
"**/*.prefab":true,
|
||||
"**/*.unity":true,
|
||||
"build/":true,
|
||||
"Build/":true,
|
||||
"Library/":true,
|
||||
"library/":true,
|
||||
"obj/":true,
|
||||
"Obj/":true,
|
||||
"ProjectSettings/":true,
|
||||
"temp/":true,
|
||||
"Temp/":true
|
||||
"files.exclude": {
|
||||
"**/.DS_Store": true,
|
||||
"**/.git": true,
|
||||
"**/.gitmodules": true,
|
||||
"**/*.booproj": true,
|
||||
"**/*.pidb": true,
|
||||
"**/*.suo": true,
|
||||
"**/*.user": true,
|
||||
"**/*.userprefs": true,
|
||||
"**/*.unityproj": true,
|
||||
"**/*.dll": true,
|
||||
"**/*.exe": true,
|
||||
"**/*.pdf": true,
|
||||
"**/*.mid": true,
|
||||
"**/*.midi": true,
|
||||
"**/*.wav": true,
|
||||
"**/*.gif": true,
|
||||
"**/*.ico": true,
|
||||
"**/*.jpg": true,
|
||||
"**/*.jpeg": true,
|
||||
"**/*.png": true,
|
||||
"**/*.psd": true,
|
||||
"**/*.tga": true,
|
||||
"**/*.tif": true,
|
||||
"**/*.tiff": true,
|
||||
"**/*.3ds": true,
|
||||
"**/*.3DS": true,
|
||||
"**/*.fbx": true,
|
||||
"**/*.FBX": true,
|
||||
"**/*.lxo": true,
|
||||
"**/*.LXO": true,
|
||||
"**/*.ma": true,
|
||||
"**/*.MA": true,
|
||||
"**/*.obj": true,
|
||||
"**/*.OBJ": true,
|
||||
"**/*.asset": true,
|
||||
"**/*.cubemap": true,
|
||||
"**/*.flare": true,
|
||||
"**/*.mat": true,
|
||||
"**/*.meta": true,
|
||||
"**/*.prefab": true,
|
||||
"**/*.unity": true,
|
||||
"build/": true,
|
||||
"Build/": true,
|
||||
"Library/": true,
|
||||
"library/": true,
|
||||
"obj/": true,
|
||||
"Obj/": true,
|
||||
"ProjectSettings/": true,
|
||||
"temp/": true,
|
||||
"Temp/": true
|
||||
},
|
||||
"dotnet.preferCSharpExtension": true
|
||||
"dotnet.preferCSharpExtension": true,
|
||||
"dotnet.defaultSolution": "SnakesMP.sln"
|
||||
}
|
||||
|
|
@ -1,5 +1,89 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &3697796283690876146
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 7589153798718879411}
|
||||
- component: {fileID: 336423531657366496}
|
||||
m_Layer: 0
|
||||
m_Name: apple_ico
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &7589153798718879411
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3697796283690876146}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0.144, z: 0}
|
||||
m_LocalScale: {x: 0.31413612, y: 0.31413612, z: 0.31413612}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 3122573321714585010}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &336423531657366496
|
||||
SpriteRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 3697796283690876146}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 0
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: a97c105638bdf8b4a8650670310a4cd3, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 0
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 5
|
||||
m_Sprite: {fileID: 21300000, guid: f85dd7b7fa841004f8377ea4556243c0, type: 3}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_FlipX: 0
|
||||
m_FlipY: 0
|
||||
m_DrawMode: 0
|
||||
m_Size: {x: 5.12, y: 5.12}
|
||||
m_AdaptiveModeThreshold: 0.5
|
||||
m_SpriteTileMode: 0
|
||||
m_WasSpriteAssigned: 1
|
||||
m_MaskInteraction: 0
|
||||
m_SpriteSortPoint: 0
|
||||
--- !u!1 &5559209622536861910
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -30,9 +114,10 @@ Transform:
|
|||
serializedVersion: 2
|
||||
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_LocalScale: {x: 1.25, y: 1.25, z: 1.25}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 7589153798718879411}
|
||||
m_Father: {fileID: 0}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!212 &2777607071529074277
|
||||
|
|
@ -42,7 +127,7 @@ SpriteRenderer:
|
|||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5559209622536861910}
|
||||
m_Enabled: 1
|
||||
m_Enabled: 0
|
||||
m_CastShadows: 0
|
||||
m_ReceiveShadows: 0
|
||||
m_DynamicOccludee: 1
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: e577df2efef21cb47a44b3f590e12ec6, type: 3}
|
||||
m_Name: SkinData
|
||||
m_EditorClassIdentifier:
|
||||
headScaleMultiplier: 1.2
|
||||
headScaleMultiplier: 1.5
|
||||
head:
|
||||
- direction: {x: 1, y: 0}
|
||||
sprite: {fileID: 21300000, guid: 623ebfd036e30a5459048b0bbb405137, type: 3}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,8 @@ MonoBehaviour:
|
|||
skin: {fileID: 11400000, guid: 1645ac28e994f8d44840fc5e5319be32, type: 2}
|
||||
direction: {x: 1, y: 0}
|
||||
spriteRenderer: {fileID: 6309712304440343176}
|
||||
myColor: {r: 0, g: 1, b: 0.083200455, a: 1}
|
||||
enemyColor: {r: 1, g: 0, b: 0.059296608, a: 1}
|
||||
isHead: 0
|
||||
--- !u!1 &2340789509869100348
|
||||
GameObject:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c55c45b38b91486478563c844605434e
|
||||
guid: 0a3170d35648c7546a1a6d47ebc0b6db
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
|
|
|
|||
122
Assets/Scripts/ButtonSet.cs
Normal file
|
|
@ -0,0 +1,122 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
|
||||
public class ButtonSet : MonoBehaviour
|
||||
{
|
||||
public const float buttonHoldInterval = 0.25f;
|
||||
|
||||
public static Action OnLeft, OnRight, OnUp, OnDown;
|
||||
public static bool DownPressed;
|
||||
public static bool LeftPressed;
|
||||
public static bool RightPressed;
|
||||
public static bool UpPressed;
|
||||
public EventTrigger btnUp,btnLeft,btnRight,btnDown;
|
||||
|
||||
|
||||
#region Input Handle
|
||||
void Start(){
|
||||
btnLeft.AddListener(EventTriggerType.PointerDown, OnLeftDown);
|
||||
btnLeft.AddListener(EventTriggerType.PointerUp, OnLeftUp);
|
||||
|
||||
btnRight.AddListener(EventTriggerType.PointerDown, OnRightDown);
|
||||
btnRight.AddListener(EventTriggerType.PointerUp, OnRightUp);
|
||||
|
||||
btnDown.AddListener(EventTriggerType.PointerDown, OnDownDown);
|
||||
btnDown.AddListener(EventTriggerType.PointerUp, OnDownUp);
|
||||
|
||||
btnUp.AddListener(EventTriggerType.PointerDown, OnUpDown);
|
||||
btnUp.AddListener(EventTriggerType.PointerUp, OnUpUp);
|
||||
|
||||
}
|
||||
|
||||
void OnLeftDown(BaseEventData e){
|
||||
LeftPressed=true;
|
||||
leftTimer=buttonHoldInterval;
|
||||
OnLeft?.Invoke();
|
||||
}
|
||||
|
||||
void OnLeftUp(BaseEventData e){
|
||||
LeftPressed=false;
|
||||
}
|
||||
|
||||
void OnRightDown(BaseEventData e){
|
||||
RightPressed=true;
|
||||
rightTimer=buttonHoldInterval;
|
||||
OnRight?.Invoke();
|
||||
}
|
||||
|
||||
void OnRightUp(BaseEventData e){
|
||||
RightPressed=false;
|
||||
}
|
||||
|
||||
void OnDownDown(BaseEventData e){
|
||||
DownPressed=true;
|
||||
downTimer = buttonHoldInterval;
|
||||
OnDown?.Invoke();
|
||||
}
|
||||
|
||||
void OnDownUp(BaseEventData e){
|
||||
DownPressed=false;
|
||||
}
|
||||
|
||||
void OnUpUp(BaseEventData e){
|
||||
UpPressed = false;
|
||||
}
|
||||
|
||||
|
||||
void OnUpDown(BaseEventData e){
|
||||
UpPressed = true;
|
||||
upTimer = buttonHoldInterval;
|
||||
OnUp?.Invoke();
|
||||
}
|
||||
#endregion
|
||||
|
||||
float leftTimer,rightTimer, upTimer,downTimer=0;
|
||||
void Update()
|
||||
{
|
||||
if(LeftPressed){
|
||||
if(leftTimer > 0){
|
||||
leftTimer-=Time.deltaTime;
|
||||
}else{
|
||||
leftTimer=buttonHoldInterval;
|
||||
OnLeft?.Invoke();
|
||||
}
|
||||
}else{
|
||||
leftTimer=0;
|
||||
}
|
||||
|
||||
if(RightPressed){
|
||||
if(rightTimer > 0){
|
||||
rightTimer-=Time.deltaTime;
|
||||
}else{
|
||||
rightTimer=buttonHoldInterval;
|
||||
OnRight?.Invoke();
|
||||
}
|
||||
}else{
|
||||
rightTimer=0;
|
||||
}
|
||||
|
||||
if(UpPressed){
|
||||
if(upTimer > 0){
|
||||
upTimer -= Time.deltaTime;
|
||||
}else{
|
||||
upTimer = buttonHoldInterval;
|
||||
OnUp?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
if(DownPressed){
|
||||
if(downTimer > 0){
|
||||
downTimer -= Time.deltaTime;
|
||||
}else{
|
||||
downTimer = buttonHoldInterval;
|
||||
OnDown?.Invoke();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/Scripts/ButtonSet.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4000f3b9be3036a4fb56bf2c0ca1e900
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,11 +1,14 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using ExitGames.Client.Photon;
|
||||
using Photon.Pun;
|
||||
using Photon.Realtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.SceneManagement;
|
||||
|
||||
public class GameManager : MonoBehaviourPunCallbacks, IOnEventCallback
|
||||
|
|
@ -13,13 +16,19 @@ public class GameManager : MonoBehaviourPunCallbacks, IOnEventCallback
|
|||
const int START_WAIT_TIME = 10;
|
||||
|
||||
const byte GAME_START_CODE = 1;
|
||||
|
||||
const byte GAME_OVER_CODE = 2;
|
||||
|
||||
DateTime startedTime = DateTime.UnixEpoch;
|
||||
public bool gameStarted => startedTime != DateTime.UnixEpoch;
|
||||
RaiseEventOptions raiseEventOptions = new RaiseEventOptions { Receivers = ReceiverGroup.All };
|
||||
|
||||
public SnakeController p1;
|
||||
public SnakeController p2;
|
||||
public GameObject wonScreen;
|
||||
public GameObject lostScreen;
|
||||
public TMP_Text mp_status_txt;
|
||||
public TMP_Text scoreTxtYou,scoreTxtEnemy;
|
||||
public GameObject fruitPrefab;
|
||||
public List<GameObject> spawnedFruits = new List<GameObject>();
|
||||
public int maxFruits = 10;
|
||||
|
|
@ -35,6 +44,7 @@ public class GameManager : MonoBehaviourPunCallbacks, IOnEventCallback
|
|||
|
||||
void Start()
|
||||
{
|
||||
scoreTxtEnemy.text = scoreTxtYou.text = "-";
|
||||
if(!PhotonNetwork.IsConnectedAndReady){
|
||||
SceneManager.LoadScene(0);
|
||||
}
|
||||
|
|
@ -54,6 +64,10 @@ public class GameManager : MonoBehaviourPunCallbacks, IOnEventCallback
|
|||
WaitForGameStart();
|
||||
return;
|
||||
}
|
||||
TimeSpan timeSince = DateTime.Now - startedTime;
|
||||
mp_status_txt.text = timeSince.Minutes + ":" + timeSince.Seconds.ToString("00");
|
||||
|
||||
UpdateScores();
|
||||
|
||||
if (PhotonNetwork.IsMasterClient)
|
||||
{
|
||||
|
|
@ -71,14 +85,22 @@ public class GameManager : MonoBehaviourPunCallbacks, IOnEventCallback
|
|||
|
||||
}
|
||||
|
||||
void UpdateScores(){
|
||||
scoreTxtYou.text = getPlayerScore(PhotonNetwork.LocalPlayer).ToString();
|
||||
scoreTxtEnemy.text = getPlayerScore(PhotonNetwork.PlayerListOthers.FirstOrDefault()).ToString();
|
||||
}
|
||||
|
||||
void SpawnFruits(){
|
||||
|
||||
if(spawnedFruits.Count > maxFruits){return;}
|
||||
if(fruitSpawnTimer >0){
|
||||
fruitSpawnTimer-=Time.deltaTime;
|
||||
return;
|
||||
if(spawnedFruits.Count <4){
|
||||
//spawn 2
|
||||
}else{
|
||||
if(fruitSpawnTimer >0){
|
||||
fruitSpawnTimer-=Time.deltaTime;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fruitSpawnTimer = fruitSpawnInterval;
|
||||
|
||||
spawnedFruits.Add(PhotonNetwork.Instantiate(fruitPrefab.name, GetRandomPoint(),Quaternion.identity));
|
||||
|
|
@ -108,6 +130,10 @@ public class GameManager : MonoBehaviourPunCallbacks, IOnEventCallback
|
|||
}
|
||||
}
|
||||
|
||||
int getPlayerScore(Player p){
|
||||
return p.CustomProperties.ContainsKey("score") ? (int)p.CustomProperties["score"] : 0;
|
||||
}
|
||||
|
||||
Vector2 GetRandomPoint(){
|
||||
SnakeController p = (p1.gameObject.activeSelf) ? p1 : p2;
|
||||
|
||||
|
|
@ -149,6 +175,13 @@ public class GameManager : MonoBehaviourPunCallbacks, IOnEventCallback
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void OnGameOver(){
|
||||
PhotonNetwork.RaiseEvent(GAME_OVER_CODE, PhotonNetwork.IsMasterClient ? 0 : 1, raiseEventOptions, SendOptions.SendReliable);
|
||||
}
|
||||
|
||||
bool gameOver = false;
|
||||
int winnerId = -1;
|
||||
public void OnEvent(EventData photonEvent)
|
||||
{
|
||||
if (photonEvent.Code == GAME_START_CODE)
|
||||
|
|
@ -156,6 +189,99 @@ public class GameManager : MonoBehaviourPunCallbacks, IOnEventCallback
|
|||
Debug.Log("Game Started");
|
||||
startedTime = DateTime.Now;
|
||||
|
||||
}else if(photonEvent.Code == GAME_OVER_CODE){
|
||||
Debug.Log("Game Over");
|
||||
gameOver = true;
|
||||
winnerId = (int)photonEvent.CustomData;
|
||||
if(PhotonNetwork.IsMasterClient){
|
||||
wonScreen.SetActive(winnerId== 0);
|
||||
lostScreen.SetActive(winnerId != 0);
|
||||
}else{
|
||||
wonScreen.SetActive(winnerId != 0);
|
||||
lostScreen.SetActive(winnerId== 0);
|
||||
}
|
||||
|
||||
StartCoroutine(SubmitGameData());
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator SubmitGameData()
|
||||
{
|
||||
// Create the leaderboard object
|
||||
Leaderboard leaderboard = new Leaderboard
|
||||
{
|
||||
master = scoreTxtYou.text,
|
||||
client = scoreTxtEnemy.text
|
||||
};
|
||||
|
||||
// Create the submission object
|
||||
Submission submission = new Submission
|
||||
{
|
||||
gameAddress = GameData.address,
|
||||
playerType = PhotonNetwork.IsMasterClient ? "master" : "client",
|
||||
username = GameData.user_id,
|
||||
winner = gameOver ? (winnerId == 0 ? "master" : "client") : "",
|
||||
leaderboard = leaderboard,
|
||||
score = getPlayerScore(PhotonNetwork.LocalPlayer),
|
||||
game_id = "snakes",
|
||||
publicKey= GameData.pubkey,
|
||||
wager = GameData.wager
|
||||
};
|
||||
|
||||
// Convert submission to JSON
|
||||
string json = JsonUtility.ToJson(submission);
|
||||
byte[] jsonData = Encoding.UTF8.GetBytes(json);
|
||||
|
||||
// Send request to the server
|
||||
using (UnityWebRequest request = new UnityWebRequest($"{Constants.VALIDATOR_URL}submit", "POST"))
|
||||
{
|
||||
request.uploadHandler = new UploadHandlerRaw(jsonData);
|
||||
request.downloadHandler = new DownloadHandlerBuffer();
|
||||
request.SetRequestHeader("Content-Type", "application/json");
|
||||
|
||||
yield return request.SendWebRequest();
|
||||
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
if (request.result == UnityWebRequest.Result.Success)
|
||||
#else
|
||||
if (!request.isNetworkError && !request.isHttpError)
|
||||
#endif
|
||||
{
|
||||
// Debug.Log("Submission successful");
|
||||
// Debug.Log("Response: " + request.downloadHandler.text);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Error submitting game data:");
|
||||
Debug.Log(request.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator SubmitRefundReq()
|
||||
{
|
||||
|
||||
// Send request to the server
|
||||
using (UnityWebRequest request = new UnityWebRequest($"{Constants.VALIDATOR_URL}requestRefund?gameAddress=" + GameData.address, "GET"))
|
||||
{
|
||||
request.SetRequestHeader("Content-Type", "application/json");
|
||||
|
||||
yield return request.SendWebRequest();
|
||||
|
||||
#if UNITY_2020_1_OR_NEWER
|
||||
if (request.result == UnityWebRequest.Result.Success)
|
||||
#else
|
||||
if (!request.isNetworkError && !request.isHttpError)
|
||||
#endif
|
||||
{
|
||||
Debug.Log("Refund request submitted successfully");
|
||||
JSBridge.instance.OnClose(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("Error submitting refund request:");
|
||||
Debug.Log(request.error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
181
Assets/Scripts/MenuManager.cs
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Photon.Pun;
|
||||
using Photon.Realtime;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
using UnityEngine.SceneManagement;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class MenuManager : MonoBehaviourPunCallbacks
|
||||
{
|
||||
|
||||
public GameObject connectingPanel;
|
||||
public TMP_Text ownerUsernameTxt;
|
||||
public Image ownerProfiPicImage;
|
||||
public TMP_Text joinerUsernameTxt;
|
||||
public Image joinerProfilePicImage;
|
||||
|
||||
void ConnectPhoton(){
|
||||
connectingPanel.SetActive(true);
|
||||
PhotonNetwork.AuthValues = new AuthenticationValues();
|
||||
PhotonNetwork.AuthValues.UserId = GameData.user_id;
|
||||
PhotonNetwork.ConnectUsingSettings();
|
||||
|
||||
}
|
||||
|
||||
|
||||
float timeoutTimer =25;
|
||||
void Update(){
|
||||
if(timeoutTimer > 0){
|
||||
timeoutTimer -= Time.deltaTime;
|
||||
if(timeoutTimer <= 0){
|
||||
SceneManager.LoadScene(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Start()
|
||||
{
|
||||
if(PhotonNetwork.IsConnected){
|
||||
connectingPanel.SetActive(false);
|
||||
}else{
|
||||
|
||||
}
|
||||
|
||||
string url = Application.absoluteURL;
|
||||
if (!string.IsNullOrEmpty(url))
|
||||
{
|
||||
// Extract query parameters
|
||||
string betId = GetQueryParam(url, "betId");
|
||||
string owner = GetQueryParam(url, "owner");
|
||||
string joiner = GetQueryParam(url, "joiner");
|
||||
string address = GetQueryParam(url, "address");
|
||||
string user_id = GetQueryParam(url, "uid");
|
||||
string pubkey = GetQueryParam(url, "pubkey");
|
||||
int wager = int.Parse(GetQueryParam(url, "wager"));
|
||||
|
||||
GameData.id = betId;
|
||||
GameData.ownerId= owner;
|
||||
GameData.joinerId = joiner;
|
||||
GameData.address = address;
|
||||
GameData.user_id = user_id;
|
||||
GameData.pubkey = pubkey;
|
||||
GameData.wager = wager;
|
||||
ConnectPhoton();
|
||||
|
||||
StartCoroutine(CoroutineUpdateGameData());
|
||||
}else{
|
||||
string betId = "tetris";
|
||||
string owner = "did:privy:cm8tsahek00mdb857e0a7igd3" + Random.Range(1,100);
|
||||
string joiner = "did:privy:cm8u2diob01cu14c92y4yq5pf";
|
||||
string address = "3NEY7LD9gL7cgwZ6Lw6dNjmnthdkqtStYmaQUCTiDRFk";
|
||||
string pubkey = "cocD4r4yNpHxPq7CzUebxEMyLki3X4d2Y3HcTX5ptUc";
|
||||
|
||||
string user_id = owner;
|
||||
|
||||
GameData.id = betId;
|
||||
GameData.ownerId= owner;
|
||||
GameData.joinerId = joiner;
|
||||
GameData.address = address;
|
||||
GameData.user_id = user_id;
|
||||
GameData.pubkey = pubkey;
|
||||
|
||||
ConnectPhoton();
|
||||
|
||||
StartCoroutine(CoroutineUpdateGameData());
|
||||
}
|
||||
}
|
||||
|
||||
IEnumerator CoroutineUpdateGameData()
|
||||
{
|
||||
// Request user profile data for both owner and joiner
|
||||
UnityWebRequest ownerDataReq = UnityWebRequest.Get($"{Constants.API_URL}get_user_by_id.php?id={GameData.ownerId}");
|
||||
UnityWebRequest joinerDataReq = UnityWebRequest.Get($"{Constants.API_URL}get_user_by_id.php?id={GameData.joinerId}");
|
||||
|
||||
// Wait for both requests to finish
|
||||
yield return ownerDataReq.SendWebRequest();
|
||||
yield return joinerDataReq.SendWebRequest();
|
||||
|
||||
// Handle errors if any
|
||||
if (ownerDataReq.result != UnityWebRequest.Result.Success || joinerDataReq.result != UnityWebRequest.Result.Success)
|
||||
{
|
||||
Debug.LogError($"Error fetching data: {ownerDataReq.error}, {joinerDataReq.error}");
|
||||
yield break;
|
||||
}
|
||||
|
||||
// Parse the response data into UserProfile objects
|
||||
try{
|
||||
UserProfile ownerProfile = JsonUtility.FromJson<UserProfile>(ownerDataReq.downloadHandler.text);
|
||||
UserProfile joinerProfile = JsonUtility.FromJson<UserProfile>(joinerDataReq.downloadHandler.text);
|
||||
|
||||
// Update username text
|
||||
ownerUsernameTxt.text = ownerProfile.username;
|
||||
joinerUsernameTxt.text = joinerProfile.username;
|
||||
|
||||
// Load the profile images using UnityWebRequest
|
||||
StartCoroutine(LoadProfileImage(ownerProfile.x_profile_url, ownerProfiPicImage));
|
||||
StartCoroutine(LoadProfileImage(joinerProfile.x_profile_url, joinerProfilePicImage));
|
||||
}catch{}
|
||||
yield return new WaitForSeconds(2f);
|
||||
if(connectingPanel.activeSelf){
|
||||
yield return new WaitForSeconds(2f);
|
||||
}
|
||||
|
||||
|
||||
PhotonNetwork.JoinOrCreateRoom(GameData.address, new Photon.Realtime.RoomOptions(){MaxPlayers=2}, Photon.Realtime.TypedLobby.Default);
|
||||
}
|
||||
|
||||
// Helper method to load an image from a URL and set it to an Image component
|
||||
IEnumerator LoadProfileImage(string url, Image imageComponent)
|
||||
{
|
||||
UnityWebRequest imageRequest = UnityWebRequestTexture.GetTexture(url);
|
||||
yield return imageRequest.SendWebRequest();
|
||||
|
||||
if (imageRequest.result == UnityWebRequest.Result.Success)
|
||||
{
|
||||
Texture2D texture = ((DownloadHandlerTexture)imageRequest.downloadHandler).texture;
|
||||
Sprite sprite = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f));
|
||||
imageComponent.sprite = sprite;
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError($"Error loading image from {url}: {imageRequest.error}");
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnConnectedToMaster()
|
||||
{
|
||||
base.OnConnectedToMaster();
|
||||
|
||||
connectingPanel.SetActive(false);
|
||||
}
|
||||
|
||||
|
||||
public void Play(){
|
||||
|
||||
PhotonNetwork.JoinRandomOrCreateRoom(new ExitGames.Client.Photon.Hashtable(), 2);
|
||||
connectingPanel.SetActive(true);
|
||||
}
|
||||
|
||||
public override void OnJoinedRoom()
|
||||
{
|
||||
base.OnJoinedRoom();
|
||||
|
||||
SceneManager.LoadScene("Game");
|
||||
}
|
||||
|
||||
string GetQueryParam(string url, string key)
|
||||
{
|
||||
if (!url.Contains("?")) return null;
|
||||
string[] queries = url.Split('?')[1].Split('&');
|
||||
foreach (string query in queries)
|
||||
{
|
||||
string[] pair = query.Split('=');
|
||||
if (pair.Length == 2 && pair[0] == key) return pair[1];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
11
Assets/Scripts/MenuManager.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7523aa834ee21984a86c05d6d6987a72
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -2,6 +2,7 @@ using System.Collections;
|
|||
using System.Collections.Generic;
|
||||
using Photon.Pun;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
public class SnakeController : MonoBehaviourPunCallbacks
|
||||
{
|
||||
|
|
@ -10,6 +11,7 @@ public class SnakeController : MonoBehaviourPunCallbacks
|
|||
public float movingInterval = 0.2f;
|
||||
public Vector2 curDirection = Vector3.right;
|
||||
public List<SnakePiece> snakePieces = new List<SnakePiece>();
|
||||
public List<BendData> bends = new List<BendData>();
|
||||
public GameObject snakePiecePrefab;
|
||||
public int startingLength = 3;
|
||||
|
||||
|
|
@ -28,6 +30,19 @@ public class SnakeController : MonoBehaviourPunCallbacks
|
|||
GameObject newPiece = PhotonNetwork.Instantiate(snakePiecePrefab.name,pos, Quaternion.identity );
|
||||
snakePieces.Add(newPiece.GetComponent<SnakePiece>());
|
||||
}
|
||||
|
||||
ButtonSet.OnUp +=OnUp;
|
||||
ButtonSet.OnDown +=OnDown;
|
||||
ButtonSet.OnLeft +=OnLeft;
|
||||
ButtonSet.OnRight+=OnRight;
|
||||
|
||||
}
|
||||
|
||||
private void OnDestroy() {
|
||||
ButtonSet.OnUp -=OnUp;
|
||||
ButtonSet.OnDown -=OnDown;
|
||||
ButtonSet.OnLeft -=OnLeft;
|
||||
ButtonSet.OnRight-=OnRight;
|
||||
}
|
||||
|
||||
bool kickstarted = false;
|
||||
|
|
@ -39,32 +54,55 @@ public class SnakeController : MonoBehaviourPunCallbacks
|
|||
|
||||
Move();
|
||||
ProcessInput();
|
||||
|
||||
if(Input.GetKeyDown(KeyCode.Space)){
|
||||
queueNewPiece=true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void ProcessInput(){
|
||||
if(Input.GetKeyDown(KeyCode.RightArrow)){
|
||||
ChangeDir(Vector2.right);
|
||||
OnRight();
|
||||
}else if(Input.GetKeyDown(KeyCode.LeftArrow)){
|
||||
ChangeDir(-Vector2.right);
|
||||
OnLeft();
|
||||
}else if(Input.GetKeyDown(KeyCode.UpArrow)){
|
||||
ChangeDir(Vector2.up);
|
||||
OnUp();
|
||||
}else if(Input.GetKeyDown(KeyCode.DownArrow)){
|
||||
ChangeDir(-Vector2.up);
|
||||
OnDown();
|
||||
}
|
||||
}
|
||||
|
||||
void OnRight(){
|
||||
ChangeDir(Vector2.right);
|
||||
}
|
||||
|
||||
void OnLeft(){
|
||||
ChangeDir(-Vector2.right);
|
||||
}
|
||||
|
||||
void OnUp(){
|
||||
ChangeDir(Vector2.up);
|
||||
}
|
||||
|
||||
void OnDown(){
|
||||
ChangeDir(-Vector2.up);
|
||||
}
|
||||
|
||||
|
||||
public int Score;
|
||||
public void AddScore(int amount = 1){
|
||||
Score+=amount;
|
||||
if(PhotonNetwork.LocalPlayer.CustomProperties.ContainsKey("score")){
|
||||
PhotonNetwork.LocalPlayer.CustomProperties["score"]=Score;
|
||||
}else{
|
||||
PhotonNetwork.LocalPlayer.CustomProperties.Add("score",Score);
|
||||
}
|
||||
PhotonNetwork.LocalPlayer.SetCustomProperties(PhotonNetwork.LocalPlayer.CustomProperties);
|
||||
}
|
||||
|
||||
List<Vector2> moveInputQueue =new List<Vector2>();
|
||||
void ChangeDir(Vector2 newDir){
|
||||
if(curDirection == -newDir){
|
||||
return;
|
||||
}
|
||||
moveInputQueue.Add(newDir);
|
||||
// curDirection = newDir;
|
||||
}
|
||||
|
||||
bool queueNewPiece = false;
|
||||
|
|
@ -74,8 +112,19 @@ public class SnakeController : MonoBehaviourPunCallbacks
|
|||
}else{
|
||||
moveTimer = movingInterval;
|
||||
if(moveInputQueue.Count >0){
|
||||
Vector2 dir = Vector2.zero;
|
||||
if(curDirection.x != 0){
|
||||
dir = new Vector2(-curDirection.x, moveInputQueue[0].y);
|
||||
}else{
|
||||
dir = new Vector2(moveInputQueue[0].x, -curDirection.y);
|
||||
}
|
||||
curDirection = moveInputQueue[0];
|
||||
moveInputQueue.RemoveAt(0);
|
||||
|
||||
bends.Add(new BendData(){
|
||||
position = snakePieces[0].transform.position,
|
||||
direction = dir
|
||||
});
|
||||
}
|
||||
Vector2 curPosition = snakePieces[0].transform.position;
|
||||
Vector2 lastPosition = snakePieces[snakePieces.Count-1].transform.position;
|
||||
|
|
@ -84,14 +133,30 @@ public class SnakeController : MonoBehaviourPunCallbacks
|
|||
Vector3 dir = (snakePieces[i-1].transform.position - snakePieces[i].transform.position).normalized;
|
||||
|
||||
snakePieces[i].direction = dir;
|
||||
|
||||
snakePieces[i].isHead=false;
|
||||
snakePieces[i].transform.position = snakePieces[i-1].transform.position;
|
||||
snakePieces[i].transform.position = snakePieces[i].transform.position;
|
||||
BendData bendToRemove = null;
|
||||
foreach(BendData bend in bends){
|
||||
if(bend.position == snakePieces[i].transform.position){
|
||||
snakePieces[i].direction = bend.direction;
|
||||
if(i == snakePieces.Count-1){
|
||||
bendToRemove = bend;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(bendToRemove!=null){
|
||||
bends.Remove(bendToRemove);
|
||||
}
|
||||
}
|
||||
|
||||
if(queueNewPiece){
|
||||
GameObject newPiece = PhotonNetwork.Instantiate(snakePiecePrefab.name,lastPosition, Quaternion.identity );
|
||||
snakePieces.Add(newPiece.GetComponent<SnakePiece>());
|
||||
AddScore();
|
||||
|
||||
queueNewPiece=false;
|
||||
}
|
||||
|
|
@ -123,6 +188,7 @@ public class SnakeController : MonoBehaviourPunCallbacks
|
|||
}else{
|
||||
Debug.Log($"Crashed into {obstacle.name}", gameObject);
|
||||
isDead = true;
|
||||
gameManager.OnGameOver();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -142,3 +208,9 @@ public class SnakeController : MonoBehaviourPunCallbacks
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class BendData{
|
||||
public Vector3 position;
|
||||
public Vector2 direction;
|
||||
}
|
||||
|
|
@ -3,11 +3,12 @@ using System.Collections.Generic;
|
|||
using Photon.Pun;
|
||||
using UnityEngine;
|
||||
|
||||
public class SnakePiece : MonoBehaviour, IPunObservable
|
||||
public class SnakePiece : MonoBehaviourPunCallbacks, IPunObservable
|
||||
{
|
||||
public SnakeSkinScriptable skin;
|
||||
public Vector2 direction = Vector2.right;
|
||||
public SpriteRenderer spriteRenderer;
|
||||
public Color myColor, enemyColor = Color.green;
|
||||
|
||||
Vector3 defaultSize;
|
||||
void Awake(){
|
||||
|
|
@ -32,6 +33,14 @@ public class SnakePiece : MonoBehaviour, IPunObservable
|
|||
}
|
||||
}
|
||||
|
||||
void Start(){
|
||||
if(photonView.IsMine){
|
||||
spriteRenderer.color = myColor;
|
||||
}else{
|
||||
spriteRenderer.color = enemyColor;
|
||||
}
|
||||
}
|
||||
|
||||
void Update(){
|
||||
transform.localScale =Vector3.one * (isHead ? skin.headScaleMultiplier : 1);
|
||||
if(isHead){
|
||||
|
|
|
|||
8
Assets/Scripts/Utils.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1f14686828d289040a578394e2d94407
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
28
Assets/Scripts/Utils/CanvasGroupBlinker.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class CanvasGroupBlinker : MonoBehaviour
|
||||
{
|
||||
public float maxOpacity = 1;
|
||||
public float minOpacity = 0.5f;
|
||||
public float speed = 1;
|
||||
|
||||
|
||||
CanvasGroup canvasGroup;
|
||||
void Awake()
|
||||
{
|
||||
canvasGroup = GetComponent<CanvasGroup>();
|
||||
}
|
||||
|
||||
float a=0;
|
||||
void Update()
|
||||
{
|
||||
a+=Time.deltaTime;
|
||||
|
||||
float sinA = Mathf.Sin(a);
|
||||
float normalized = (sinA + 1) / 2f;
|
||||
|
||||
canvasGroup.alpha = Mathf.Lerp(minOpacity,maxOpacity, normalized);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Utils/CanvasGroupBlinker.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f199e50c2dd065a4a8761261e56e0704
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
23
Assets/Scripts/Utils/DestroyAfterTime.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Photon.Pun;
|
||||
using UnityEngine;
|
||||
|
||||
public class DestroyAfterTime : MonoBehaviour
|
||||
{
|
||||
public float timer = 2f;
|
||||
void Start()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
if(timer > 0){
|
||||
timer-=Time.deltaTime;
|
||||
return;
|
||||
}else{
|
||||
PhotonNetwork.Destroy(gameObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Utils/DestroyAfterTime.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 98ef35cb02b8e484894fbb7308f45e6e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
48
Assets/Scripts/Utils/DuelFi.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
|
||||
|
||||
public static class Constants{
|
||||
public static string VALIDATOR_URL = "https://validatordev.duelfi.io/";
|
||||
public static string API_URL = "https://api.duelfi.io/v1/";
|
||||
|
||||
}
|
||||
|
||||
public static class GameData{
|
||||
public static string id= "";
|
||||
public static string ownerId="";
|
||||
public static string joinerId="";
|
||||
public static string address ="";
|
||||
public static string user_id = "";
|
||||
public static string pubkey = "";
|
||||
public static int wager = 0;
|
||||
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class UserProfile
|
||||
{
|
||||
public string id; // Unique identifier for the user
|
||||
public string username; // Username of the user
|
||||
public string bio; // Bio of the user
|
||||
public string x_profile_url; // URL of the user's profile picture
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class Leaderboard
|
||||
{
|
||||
public string master;
|
||||
public string client;
|
||||
}
|
||||
|
||||
[System.Serializable]
|
||||
public class Submission
|
||||
{
|
||||
public string gameAddress;
|
||||
public string game_id;
|
||||
public string playerType;
|
||||
public string username;
|
||||
public string winner;
|
||||
public int score;
|
||||
public Leaderboard leaderboard;
|
||||
public string publicKey;
|
||||
public int wager;
|
||||
}
|
||||
11
Assets/Scripts/Utils/DuelFi.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0a8ba036ecc67cf429c37fec10627cf7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
12
Assets/Scripts/Utils/EventTriggerExtensions.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
using UnityEngine.EventSystems;
|
||||
|
||||
public static class EventTriggerExtensions
|
||||
{
|
||||
public static void AddListener (this EventTrigger trigger, EventTriggerType eventType, System.Action<PointerEventData> listener)
|
||||
{
|
||||
EventTrigger.Entry entry = new EventTrigger.Entry();
|
||||
entry.eventID = eventType;
|
||||
entry.callback.AddListener(data => listener.Invoke((PointerEventData)data));
|
||||
trigger.triggers.Add(entry);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Utils/EventTriggerExtensions.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e7fc13ba6ce58d2408f11a2ddd13c38d
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
19
Assets/Scripts/Utils/JSBridge.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
|
||||
using UnityEngine;
|
||||
|
||||
public class JSBridge : MonoBehaviour
|
||||
{
|
||||
|
||||
public static JSBridge instance;
|
||||
void Awake()
|
||||
{
|
||||
instance = this;
|
||||
}
|
||||
|
||||
public void OnClose(int status){
|
||||
|
||||
string message = "{\"type\": \"gameClose\", \"status\": " + status + "}";
|
||||
Application.ExternalCall("sendMessageToReact", message);
|
||||
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Utils/JSBridge.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: c541ee1977430f94398f4dbdc7cbe002
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
31
Assets/Scripts/Utils/MobileLayoutChanger.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class MobileLayoutChanger : MonoBehaviour
|
||||
{
|
||||
public RectTransform mobileLayout;
|
||||
RectTransform rectTransform;
|
||||
Vector2 originalSize;
|
||||
Vector3 originalScale;
|
||||
Vector2 originalPosition;
|
||||
void Awake(){
|
||||
rectTransform = GetComponent<RectTransform>();
|
||||
originalSize = rectTransform.sizeDelta;
|
||||
originalScale = rectTransform.localScale;
|
||||
originalPosition = rectTransform.position;
|
||||
}
|
||||
void Start()
|
||||
{
|
||||
if(Screen.width < Screen.height){
|
||||
Debug.Log($"Changing {gameObject.name} to mobile layout");
|
||||
rectTransform.position = mobileLayout.position;
|
||||
rectTransform.sizeDelta = mobileLayout.sizeDelta;
|
||||
rectTransform.localScale = mobileLayout.localScale;
|
||||
}else{
|
||||
rectTransform.position = originalPosition;
|
||||
rectTransform.sizeDelta = originalSize;
|
||||
rectTransform.localScale = originalScale;
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Utils/MobileLayoutChanger.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: e192de63e50338943b70d29e94aee023
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
13
Assets/Scripts/Utils/ObjectMirror.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class ObjectMirror : MonoBehaviour
|
||||
{
|
||||
public Transform source;
|
||||
public Transform target;
|
||||
void Update()
|
||||
{
|
||||
target.gameObject.SetActive(source.gameObject.activeSelf);
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Utils/ObjectMirror.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3bc5b69386cbef64a856060652e47632
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
19
Assets/Scripts/Utils/TextMirror.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using TMPro;
|
||||
using UnityEngine;
|
||||
|
||||
public class TextMirror : MonoBehaviour
|
||||
{
|
||||
public TMP_Text source;
|
||||
TMP_Text target;
|
||||
void Start()
|
||||
{
|
||||
target=GetComponent<TMP_Text>();
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
target.text = source.text;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Utils/TextMirror.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0a293f793836c4d49b2faac6ee90bf6f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
39
Assets/Scripts/Utils/WaitForGameEnd.cs
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class WaitForGameEnd : MonoBehaviour
|
||||
{
|
||||
public GameObject[] loading;
|
||||
public GameObject[] gameEnd;
|
||||
void Start()
|
||||
{
|
||||
StartCoroutine(PollUntilGameEnd());
|
||||
}
|
||||
|
||||
|
||||
IEnumerator PollUntilGameEnd()
|
||||
{
|
||||
string response = "0";
|
||||
SetActiveAll(loading, true);
|
||||
SetActiveAll(gameEnd, false);
|
||||
while(response == "0")
|
||||
{
|
||||
WWW www = new WWW(Constants.API_URL + $"get_game_completed.php?address={GameData.address}");
|
||||
yield return www;
|
||||
response = www.text;
|
||||
yield return new WaitForSeconds(1f);
|
||||
}
|
||||
SetActiveAll(loading, false);
|
||||
SetActiveAll(gameEnd, true);
|
||||
}
|
||||
|
||||
void SetActiveAll(GameObject[] gameObjects, bool active)
|
||||
{
|
||||
foreach (var gameObject in gameObjects)
|
||||
{
|
||||
gameObject.SetActive(active);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
11
Assets/Scripts/Utils/WaitForGameEnd.cs.meta
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6cadff264e824eb4ea30a94ba2dbe6ff
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -32,6 +32,7 @@ MonoBehaviour:
|
|||
m_FsrSharpness: 0.92
|
||||
m_EnableLODCrossFade: 1
|
||||
m_LODCrossFadeDitheringType: 1
|
||||
m_ShEvalMode: 0
|
||||
m_MainLightRenderingMode: 1
|
||||
m_MainLightShadowsSupported: 1
|
||||
m_MainLightShadowmapResolution: 2048
|
||||
|
|
@ -52,9 +53,11 @@ MonoBehaviour:
|
|||
m_CascadeBorder: 0.1
|
||||
m_ShadowDepthBias: 1
|
||||
m_ShadowNormalBias: 1
|
||||
m_AnyShadowsSupported: 1
|
||||
m_SoftShadowsSupported: 0
|
||||
m_ConservativeEnclosingSphere: 0
|
||||
m_NumIterationsEnclosingSphere: 64
|
||||
m_SoftShadowQuality: 2
|
||||
m_AdditionalLightsCookieResolution: 2048
|
||||
m_AdditionalLightsCookieFormat: 3
|
||||
m_UseSRPBatcher: 1
|
||||
|
|
@ -69,6 +72,7 @@ MonoBehaviour:
|
|||
m_ColorGradingMode: 0
|
||||
m_ColorGradingLutSize: 32
|
||||
m_UseFastSRGBLinearConversion: 0
|
||||
m_SupportDataDrivenLensFlare: 1
|
||||
m_ShadowType: 1
|
||||
m_LocalShadowsSupported: 0
|
||||
m_LocalShadowsAtlasResolution: 256
|
||||
|
|
@ -78,5 +82,29 @@ MonoBehaviour:
|
|||
m_Textures:
|
||||
blueNoise64LTex: {fileID: 2800000, guid: e3d24661c1e055f45a7560c033dbb837, type: 3}
|
||||
bayerMatrixTex: {fileID: 2800000, guid: f9ee4ed84c1d10c49aabb9b210b0fc44, type: 3}
|
||||
m_PrefilteringModeMainLightShadows: 4
|
||||
m_PrefilteringModeAdditionalLight: 4
|
||||
m_PrefilteringModeAdditionalLightShadows: 0
|
||||
m_PrefilterXRKeywords: 1
|
||||
m_PrefilteringModeForwardPlus: 0
|
||||
m_PrefilteringModeDeferredRendering: 0
|
||||
m_PrefilteringModeScreenSpaceOcclusion: 0
|
||||
m_PrefilterDebugKeywords: 1
|
||||
m_PrefilterWriteRenderingLayers: 1
|
||||
m_PrefilterHDROutput: 1
|
||||
m_PrefilterSSAODepthNormals: 1
|
||||
m_PrefilterSSAOSourceDepthLow: 1
|
||||
m_PrefilterSSAOSourceDepthMedium: 1
|
||||
m_PrefilterSSAOSourceDepthHigh: 1
|
||||
m_PrefilterSSAOInterleaved: 1
|
||||
m_PrefilterSSAOBlueNoise: 1
|
||||
m_PrefilterSSAOSampleCountLow: 1
|
||||
m_PrefilterSSAOSampleCountMedium: 1
|
||||
m_PrefilterSSAOSampleCountHigh: 1
|
||||
m_PrefilterDBufferMRT1: 1
|
||||
m_PrefilterDBufferMRT2: 1
|
||||
m_PrefilterDBufferMRT3: 1
|
||||
m_PrefilterScreenCoord: 1
|
||||
m_PrefilterNativeRenderPass: 1
|
||||
m_ShaderVariantLogLevel: 0
|
||||
m_ShadowCascades: 0
|
||||
|
|
|
|||
BIN
Assets/Textures/Cartoon_green_texture_grass.jpg
Normal file
|
After Width: | Height: | Size: 2.8 MiB |
140
Assets/Textures/Cartoon_green_texture_grass.jpg.meta
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 30ed34f62e8c19b40a4556fac128cf46
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Textures/Venom Trail Game Cover Illustration 1.png
Normal file
|
After Width: | Height: | Size: 450 KiB |
140
Assets/Textures/Venom Trail Game Cover Illustration 1.png.meta
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6fc959a9efa83bb48baaf6db2f839ba9
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Textures/Venom Trail Game Cover Illustration.png
Normal file
|
After Width: | Height: | Size: 445 KiB |
140
Assets/Textures/Venom Trail Game Cover Illustration.png.meta
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
fileFormatVersion: 2
|
||||
guid: fc2df0f40aed9444eb80646a07015851
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Textures/Venom Trail.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
140
Assets/Textures/Venom Trail.png.meta
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
fileFormatVersion: 2
|
||||
guid: a8cc164e05836bd4a9674e77414168dc
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Textures/apple_ico.png
Normal file
|
After Width: | Height: | Size: 27 KiB |
140
Assets/Textures/apple_ico.png.meta
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
fileFormatVersion: 2
|
||||
guid: f85dd7b7fa841004f8377ea4556243c0
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Textures/grass.jpg
Normal file
|
After Width: | Height: | Size: 21 KiB |
140
Assets/Textures/grass.jpg.meta
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
fileFormatVersion: 2
|
||||
guid: d6001102c1fab304fb3c47f07e23862c
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Textures/ground_bg.png
Normal file
|
After Width: | Height: | Size: 325 KiB |
140
Assets/Textures/ground_bg.png.meta
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 272e99abc03081a41b0946c41f3695bf
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Textures/rocky_brown.jpg
Normal file
|
After Width: | Height: | Size: 59 KiB |
140
Assets/Textures/rocky_brown.jpg.meta
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 5857b7d5c6640764183fc6274c525e2f
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
BIN
Assets/Textures/vs.png
Normal file
|
After Width: | Height: | Size: 40 KiB |
140
Assets/Textures/vs.png.meta
Normal file
|
|
@ -0,0 +1,140 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 3b4492ad7954436448206d7b32c1fcad
|
||||
TextureImporter:
|
||||
internalIDToNameTable: []
|
||||
externalObjects: {}
|
||||
serializedVersion: 12
|
||||
mipmaps:
|
||||
mipMapMode: 0
|
||||
enableMipMap: 0
|
||||
sRGBTexture: 1
|
||||
linearTexture: 0
|
||||
fadeOut: 0
|
||||
borderMipMap: 0
|
||||
mipMapsPreserveCoverage: 0
|
||||
alphaTestReferenceValue: 0.5
|
||||
mipMapFadeDistanceStart: 1
|
||||
mipMapFadeDistanceEnd: 3
|
||||
bumpmap:
|
||||
convertToNormalMap: 0
|
||||
externalNormalMap: 0
|
||||
heightScale: 0.25
|
||||
normalMapFilter: 0
|
||||
flipGreenChannel: 0
|
||||
isReadable: 0
|
||||
streamingMipmaps: 0
|
||||
streamingMipmapsPriority: 0
|
||||
vTOnly: 0
|
||||
ignoreMipmapLimit: 0
|
||||
grayScaleToAlpha: 0
|
||||
generateCubemap: 6
|
||||
cubemapConvolution: 0
|
||||
seamlessCubemap: 0
|
||||
textureFormat: 1
|
||||
maxTextureSize: 2048
|
||||
textureSettings:
|
||||
serializedVersion: 2
|
||||
filterMode: 1
|
||||
aniso: 1
|
||||
mipBias: 0
|
||||
wrapU: 1
|
||||
wrapV: 1
|
||||
wrapW: 1
|
||||
nPOTScale: 0
|
||||
lightmap: 0
|
||||
compressionQuality: 50
|
||||
spriteMode: 1
|
||||
spriteExtrude: 1
|
||||
spriteMeshType: 1
|
||||
alignment: 0
|
||||
spritePivot: {x: 0.5, y: 0.5}
|
||||
spritePixelsToUnits: 100
|
||||
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
|
||||
spriteGenerateFallbackPhysicsShape: 1
|
||||
alphaUsage: 1
|
||||
alphaIsTransparency: 1
|
||||
spriteTessellationDetail: -1
|
||||
textureType: 8
|
||||
textureShape: 1
|
||||
singleChannelComponent: 0
|
||||
flipbookRows: 1
|
||||
flipbookColumns: 1
|
||||
maxTextureSizeSet: 0
|
||||
compressionQualitySet: 0
|
||||
textureFormatSet: 0
|
||||
ignorePngGamma: 0
|
||||
applyGammaDecoding: 0
|
||||
swizzle: 50462976
|
||||
cookieLightType: 0
|
||||
platformSettings:
|
||||
- serializedVersion: 3
|
||||
buildTarget: DefaultTexturePlatform
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: WebGL
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Standalone
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
- serializedVersion: 3
|
||||
buildTarget: Server
|
||||
maxTextureSize: 2048
|
||||
resizeAlgorithm: 0
|
||||
textureFormat: -1
|
||||
textureCompression: 1
|
||||
compressionQuality: 50
|
||||
crunchedCompression: 0
|
||||
allowsAlphaSplitting: 0
|
||||
overridden: 0
|
||||
ignorePlatformSupport: 0
|
||||
androidETC2FallbackOverride: 0
|
||||
forceMaximumCompressionQuality_BC6H_BC7: 0
|
||||
spriteSheet:
|
||||
serializedVersion: 2
|
||||
sprites: []
|
||||
outline: []
|
||||
physicsShape: []
|
||||
bones: []
|
||||
spriteID: 5e97eb03825dee720800000000000000
|
||||
internalID: 0
|
||||
vertices: []
|
||||
indices:
|
||||
edges: []
|
||||
weights: []
|
||||
secondaryTextures: []
|
||||
nameFileIdTable: {}
|
||||
mipmapLimitGroupName:
|
||||
pSDRemoveMatte: 0
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
40
Assets/arena.renderTexture
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!84 &8400000
|
||||
RenderTexture:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_Name: arena
|
||||
m_ImageContentsHash:
|
||||
serializedVersion: 2
|
||||
Hash: 00000000000000000000000000000000
|
||||
m_ForcedFallbackFormat: 4
|
||||
m_DownscaleFallback: 0
|
||||
m_IsAlphaChannelOptional: 0
|
||||
serializedVersion: 5
|
||||
m_Width: 1280
|
||||
m_Height: 1280
|
||||
m_AntiAliasing: 1
|
||||
m_MipCount: -1
|
||||
m_DepthStencilFormat: 94
|
||||
m_ColorFormat: 8
|
||||
m_MipMap: 0
|
||||
m_GenerateMips: 1
|
||||
m_SRGB: 0
|
||||
m_UseDynamicScale: 0
|
||||
m_BindMS: 0
|
||||
m_EnableCompatibleFormat: 1
|
||||
m_EnableRandomWrite: 0
|
||||
m_TextureSettings:
|
||||
serializedVersion: 2
|
||||
m_FilterMode: 1
|
||||
m_Aniso: 0
|
||||
m_MipBias: 0
|
||||
m_WrapU: 1
|
||||
m_WrapV: 1
|
||||
m_WrapW: 1
|
||||
m_Dimension: 2
|
||||
m_VolumeDepth: 1
|
||||
m_ShadowSamplingMode: 2
|
||||
8
Assets/arena.renderTexture.meta
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 4237d49faf921534c8a9b2ad796b1cb4
|
||||
NativeFormatImporter:
|
||||
externalObjects: {}
|
||||
mainObjectFileID: 8400000
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
"dependencies": {
|
||||
"com.unity.feature.2d": "2.0.0",
|
||||
"com.unity.ide.cursor": "https://github.com/boxqkrtm/com.unity.ide.cursor.git",
|
||||
"com.unity.ide.rider": "3.0.24",
|
||||
"com.unity.ide.visualstudio": "2.0.18",
|
||||
"com.unity.ide.vscode": "1.2.5",
|
||||
|
|
|
|||
|
|
@ -135,6 +135,15 @@
|
|||
"com.unity.2d.aseprite": "1.0.1"
|
||||
}
|
||||
},
|
||||
"com.unity.ide.cursor": {
|
||||
"version": "https://github.com/boxqkrtm/com.unity.ide.cursor.git",
|
||||
"depth": 0,
|
||||
"source": "git",
|
||||
"dependencies": {
|
||||
"com.unity.test-framework": "1.1.9"
|
||||
},
|
||||
"hash": "2c0153a9bab1abc783e5599fa2d2cc3c69d5e389"
|
||||
},
|
||||
"com.unity.ide.rider": {
|
||||
"version": "3.0.24",
|
||||
"depth": 0,
|
||||
|
|
|
|||
18
ProjectSettings/BurstAotSettings_StandaloneWindows.json
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"MonoBehaviour": {
|
||||
"Version": 4,
|
||||
"EnableBurstCompilation": true,
|
||||
"EnableOptimisations": true,
|
||||
"EnableSafetyChecks": false,
|
||||
"EnableDebugInAllBuilds": false,
|
||||
"DebugDataKind": 1,
|
||||
"EnableArmv9SecurityFeatures": false,
|
||||
"CpuMinTargetX32": 0,
|
||||
"CpuMaxTargetX32": 0,
|
||||
"CpuMinTargetX64": 0,
|
||||
"CpuMaxTargetX64": 0,
|
||||
"CpuTargetsX32": 6,
|
||||
"CpuTargetsX64": 72,
|
||||
"OptimizeFor": 0
|
||||
}
|
||||
}
|
||||
16
ProjectSettings/BurstAotSettings_WebGL.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"MonoBehaviour": {
|
||||
"Version": 4,
|
||||
"EnableBurstCompilation": true,
|
||||
"EnableOptimisations": true,
|
||||
"EnableSafetyChecks": false,
|
||||
"EnableDebugInAllBuilds": false,
|
||||
"DebugDataKind": 1,
|
||||
"EnableArmv9SecurityFeatures": false,
|
||||
"CpuMinTargetX32": 0,
|
||||
"CpuMaxTargetX32": 0,
|
||||
"CpuMinTargetX64": 0,
|
||||
"CpuMaxTargetX64": 0,
|
||||
"OptimizeFor": 0
|
||||
}
|
||||
}
|
||||
6
ProjectSettings/CommonBurstAotSettings.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"MonoBehaviour": {
|
||||
"Version": 4,
|
||||
"DisabledWarnings": ""
|
||||
}
|
||||
}
|
||||
|
|
@ -44,8 +44,8 @@ PlayerSettings:
|
|||
m_HolographicTrackingLossScreen: {fileID: 0}
|
||||
defaultScreenWidth: 1920
|
||||
defaultScreenHeight: 1080
|
||||
defaultScreenWidthWeb: 960
|
||||
defaultScreenHeightWeb: 600
|
||||
defaultScreenWidthWeb: 1280
|
||||
defaultScreenHeightWeb: 728
|
||||
m_StereoRenderingPath: 0
|
||||
m_ActiveColorSpace: 1
|
||||
m_SpriteBatchVertexThreshold: 300
|
||||
|
|
@ -77,7 +77,7 @@ PlayerSettings:
|
|||
androidFullscreenMode: 1
|
||||
defaultIsNativeResolution: 1
|
||||
macRetinaSupport: 1
|
||||
runInBackground: 0
|
||||
runInBackground: 1
|
||||
captureSingleScreen: 0
|
||||
muteOtherAudioSources: 0
|
||||
Prepare IOS For Recording: 0
|
||||
|
|
@ -289,7 +289,8 @@ PlayerSettings:
|
|||
openGLRequireES31: 0
|
||||
openGLRequireES31AEP: 0
|
||||
openGLRequireES32: 0
|
||||
m_TemplateCustomTags: {}
|
||||
m_TemplateCustomTags:
|
||||
PRODUCT_DESCRIPTION:
|
||||
mobileMTRendering:
|
||||
Android: 1
|
||||
iPhone: 1
|
||||
|
|
@ -547,7 +548,7 @@ PlayerSettings:
|
|||
webGLTemplate: APPLICATION:Default
|
||||
webGLAnalyzeBuildSize: 0
|
||||
webGLUseEmbeddedResources: 0
|
||||
webGLCompressionFormat: 0
|
||||
webGLCompressionFormat: 2
|
||||
webGLWasmArithmeticExceptions: 0
|
||||
webGLLinkerTarget: 1
|
||||
webGLThreadsSupport: 0
|
||||
|
|
|
|||
16
ProjectSettings/ShaderGraphSettings.asset
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &1
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 53
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: de02f9e1d18f588468e474319d09a723, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
customInterpolatorErrorThreshold: 32
|
||||
customInterpolatorWarningThreshold: 16
|
||||