mirror of https://github.com/tuyoogame/YooAsset
update samples
parent
c976221cbb
commit
9739fe2b79
|
@ -21,7 +21,7 @@ MonoBehaviour:
|
|||
PackageDesc:
|
||||
Groups:
|
||||
- GroupName: battle
|
||||
GroupDesc:
|
||||
GroupDesc: "\u6218\u6597"
|
||||
AssetTags:
|
||||
ActiveRuleName: EnableGroup
|
||||
Collectors:
|
||||
|
@ -50,7 +50,7 @@ MonoBehaviour:
|
|||
AssetTags:
|
||||
UserData:
|
||||
- GroupName: shader
|
||||
GroupDesc:
|
||||
GroupDesc: "\u7740\u8272\u5668"
|
||||
AssetTags:
|
||||
ActiveRuleName: EnableGroup
|
||||
Collectors:
|
||||
|
@ -63,7 +63,7 @@ MonoBehaviour:
|
|||
AssetTags:
|
||||
UserData:
|
||||
- GroupName: scene
|
||||
GroupDesc:
|
||||
GroupDesc: "\u573A\u666F"
|
||||
AssetTags:
|
||||
ActiveRuleName: EnableGroup
|
||||
Collectors:
|
||||
|
@ -76,7 +76,7 @@ MonoBehaviour:
|
|||
AssetTags:
|
||||
UserData:
|
||||
- GroupName: ugui
|
||||
GroupDesc:
|
||||
GroupDesc: "\u9762\u677F"
|
||||
AssetTags:
|
||||
ActiveRuleName: EnableGroup
|
||||
Collectors:
|
||||
|
@ -104,3 +104,16 @@ MonoBehaviour:
|
|||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
- GroupName: config
|
||||
GroupDesc: "\u914D\u7F6E\u8868"
|
||||
AssetTags:
|
||||
ActiveRuleName: EnableGroup
|
||||
Collectors:
|
||||
- CollectPath: Assets/Samples/Space Shooter/GameRes/Config
|
||||
CollectorGUID: 1894d23646ddbf8479e579cc03261dde
|
||||
CollectorType: 0
|
||||
AddressRuleName: AddressByFileName
|
||||
PackRuleName: PackRawFile
|
||||
FilterRuleName: CollectAll
|
||||
AssetTags:
|
||||
UserData:
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1894d23646ddbf8479e579cc03261dde
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1 @@
|
|||
Powered by YooAsset @tuyoogame
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 66ce1e032fc66694bb3fce32961d78d5
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -14,7 +14,7 @@ GameObject:
|
|||
- component: {fileID: 8153114547710269446}
|
||||
m_Layer: 0
|
||||
m_Name: asteroid01
|
||||
m_TagString: Asteroid
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
|
@ -93,7 +93,7 @@ GameObject:
|
|||
- component: {fileID: 6609967452740485438}
|
||||
m_Layer: 0
|
||||
m_Name: asteroid02
|
||||
m_TagString: Asteroid
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
|
@ -93,7 +93,7 @@ GameObject:
|
|||
- component: {fileID: 4093119317317235419}
|
||||
m_Layer: 0
|
||||
m_Name: asteroid03
|
||||
m_TagString: Asteroid
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
|
@ -14,7 +14,7 @@ GameObject:
|
|||
- component: {fileID: 7168776728617073029}
|
||||
m_Layer: 0
|
||||
m_Name: enemy_bullet
|
||||
m_TagString: EnemyBullet
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
|
@ -4714,7 +4714,7 @@ GameObject:
|
|||
- component: {fileID: 8046716069608073559}
|
||||
m_Layer: 0
|
||||
m_Name: enemy_ship
|
||||
m_TagString: Enemy
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
|
@ -14,7 +14,7 @@ GameObject:
|
|||
- component: {fileID: 2296800368016434796}
|
||||
m_Layer: 0
|
||||
m_Name: player_bullet
|
||||
m_TagString: PlayerBullet
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
|
@ -9481,7 +9481,7 @@ GameObject:
|
|||
- component: {fileID: 5342208951388308754}
|
||||
m_Layer: 0
|
||||
m_Name: player_ship
|
||||
m_TagString: Player
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
|
@ -129,7 +129,7 @@ GameObject:
|
|||
- component: {fileID: 37}
|
||||
m_Layer: 0
|
||||
m_Name: Boundary
|
||||
m_TagString: Boundary
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
@ -10999,7 +10999,7 @@ GameObject:
|
|||
- component: {fileID: 1691764579}
|
||||
m_Layer: 0
|
||||
m_Name: BoundaryWorld
|
||||
m_TagString: Boundary
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
|
|
|
@ -66,7 +66,7 @@ MonoBehaviour:
|
|||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: 8297a2bf97dbbba468bd2518d003a876, type: 3}
|
||||
m_FontSize: 28
|
||||
m_FontSize: 22
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 2
|
||||
|
@ -77,7 +77,7 @@ MonoBehaviour:
|
|||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: Powered by YooAsset
|
||||
m_Text:
|
||||
--- !u!1 &4142826567245113227
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
@ -25,7 +25,8 @@ public class EntityAsteroid : MonoBehaviour
|
|||
}
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("PlayerBullet"))
|
||||
var name = other.gameObject.name;
|
||||
if (name.StartsWith("player"))
|
||||
{
|
||||
BattleEventDefine.AsteroidExplosion.SendEventMessage(this.transform.position, this.transform.rotation);
|
||||
_handle.Restore();
|
||||
|
@ -34,7 +35,8 @@ public class EntityAsteroid : MonoBehaviour
|
|||
}
|
||||
void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Boundary"))
|
||||
var name = other.gameObject.name;
|
||||
if (name.StartsWith("Boundary"))
|
||||
{
|
||||
_handle.Restore();
|
||||
_handle = null;
|
||||
|
|
|
@ -23,21 +23,23 @@ public class EntityBullet : MonoBehaviour
|
|||
}
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Boundary"))
|
||||
var name = other.gameObject.name;
|
||||
if (name.StartsWith("Boundary"))
|
||||
return;
|
||||
|
||||
if (this.gameObject.CompareTag("EnemyBullet"))
|
||||
var goName = this.gameObject.name;
|
||||
if (goName.StartsWith("enemy_bullet"))
|
||||
{
|
||||
if (other.CompareTag("Enemy") == false)
|
||||
if (name.StartsWith("enemy") == false)
|
||||
{
|
||||
_handle.Restore();
|
||||
_handle = null;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.gameObject.CompareTag("PlayerBullet"))
|
||||
if (goName.StartsWith("player_bullet"))
|
||||
{
|
||||
if (other.CompareTag("Player") == false)
|
||||
if (name.StartsWith("player") == false)
|
||||
{
|
||||
_handle.Restore();
|
||||
_handle = null;
|
||||
|
@ -46,7 +48,8 @@ public class EntityBullet : MonoBehaviour
|
|||
}
|
||||
void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Boundary"))
|
||||
var name = other.gameObject.name;
|
||||
if (name.StartsWith("Boundary"))
|
||||
{
|
||||
_handle.Restore();
|
||||
_handle = null;
|
||||
|
|
|
@ -68,7 +68,8 @@ public class EntityEnemy : MonoBehaviour
|
|||
}
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("PlayerBullet"))
|
||||
var name = other.gameObject.name;
|
||||
if (name.StartsWith("player"))
|
||||
{
|
||||
BattleEventDefine.EnemyDead.SendEventMessage(this.transform.position, this.transform.rotation);
|
||||
_handle.Restore();
|
||||
|
@ -77,7 +78,8 @@ public class EntityEnemy : MonoBehaviour
|
|||
}
|
||||
void OnTriggerExit(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Boundary"))
|
||||
var name = other.gameObject.name;
|
||||
if (name.StartsWith("Boundary"))
|
||||
{
|
||||
_handle.Restore();
|
||||
_handle = null;
|
||||
|
|
|
@ -54,7 +54,8 @@ public class EntityPlayer : MonoBehaviour
|
|||
}
|
||||
void OnTriggerEnter(Collider other)
|
||||
{
|
||||
if (other.CompareTag("Enemy") || other.CompareTag("EnemyBullet") || other.CompareTag("Asteroid"))
|
||||
var name = other.gameObject.name;
|
||||
if (name.StartsWith("enemy") || name.StartsWith("asteroid"))
|
||||
{
|
||||
BattleEventDefine.PlayerDead.SendEventMessage(this.transform.position, this.transform.rotation);
|
||||
_handle.Restore();
|
||||
|
|
|
@ -142,7 +142,7 @@ internal class FsmInitialize : IStateNode
|
|||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public FileStream LoadFromStream(DecryptFileInfo fileInfo)
|
||||
public Stream LoadFromStream(DecryptFileInfo fileInfo)
|
||||
{
|
||||
BundleStream bundleStream = new BundleStream(fileInfo.FilePath, FileMode.Open);
|
||||
return bundleStream;
|
||||
|
|
|
@ -3,17 +3,26 @@ using System.Collections.Generic;
|
|||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
using UniFramework.Window;
|
||||
using YooAsset;
|
||||
|
||||
[WindowAttribute(100, false)]
|
||||
public class UIAboutWindow : UIWindow
|
||||
{
|
||||
private Text _info;
|
||||
private RawFileOperationHandle _handle;
|
||||
|
||||
public override void OnCreate()
|
||||
{
|
||||
var maskBtn = this.transform.Find("mask").GetComponent<Button>();
|
||||
maskBtn.onClick.AddListener(OnClicMaskBtn);
|
||||
|
||||
_info = this.transform.Find("bg/info").GetComponent<Text>();
|
||||
_handle = YooAssets.LoadRawFileAsync("about");
|
||||
_handle.Completed += _handle_Completed;
|
||||
}
|
||||
public override void OnDestroy()
|
||||
{
|
||||
_handle.Release();
|
||||
}
|
||||
public override void OnRefresh()
|
||||
{
|
||||
|
@ -22,6 +31,11 @@ public class UIAboutWindow : UIWindow
|
|||
{
|
||||
}
|
||||
|
||||
private void _handle_Completed(RawFileOperationHandle obj)
|
||||
{
|
||||
_info.text = _handle.GetRawFileText();
|
||||
}
|
||||
|
||||
private void OnClicMaskBtn()
|
||||
{
|
||||
UniWindow.CloseWindow<UIAboutWindow>();
|
||||
|
|
Loading…
Reference in New Issue