提交修改

This commit is contained in:
Bob.Song
2026-03-06 09:44:00 +08:00
parent e125bb869e
commit db7bc90fe2
3631 changed files with 9050 additions and 395938 deletions

View File

@@ -1,55 +0,0 @@
using UnityEngine;
using FairyGUI;
public class ExtensionMain : MonoBehaviour
{
GComponent _mainView;
GList _list;
void Awake()
{
UIPackage.AddPackage("UI/Extension");
UIObjectFactory.SetPackageItemExtension("ui://Extension/mailItem", typeof(MailItem));
}
void Start()
{
Application.targetFrameRate = 60;
Stage.inst.onKeyDown.Add(OnKeyDown);
_mainView = this.GetComponent<UIPanel>().ui;
_list = _mainView.GetChild("mailList").asList;
for (int i = 0; i < 10; i++)
{
MailItem item = (MailItem)_list.AddItemFromPool();
item.setFetched(i % 3 == 0);
item.setRead(i % 2 == 0);
item.setTime("5 Nov 2015 16:24:33");
item.title = "Mail title here";
}
_list.EnsureBoundsCorrect();
float delay = 0f;
for (int i = 0; i < 10; i++)
{
MailItem item = (MailItem)_list.GetChildAt(i);
if (_list.IsChildInView(item))
{
item.PlayEffect(delay);
delay += 0.2f;
}
else
break;
}
}
void OnKeyDown(EventContext context)
{
if (context.inputEvent.keyCode == KeyCode.Escape)
{
Application.Quit();
}
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 1b0647927cbff65449b89590caf97481
timeCreated: 1446648215
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -1,41 +0,0 @@
using UnityEngine;
using FairyGUI;
public class MailItem : GButton
{
GTextField _timeText;
Controller _readController;
Controller _fetchController;
Transition _trans;
public override void ConstructFromXML(FairyGUI.Utils.XML cxml)
{
base.ConstructFromXML(cxml);
_timeText = this.GetChild("timeText").asTextField;
_readController = this.GetController("IsRead");
_fetchController = this.GetController("c1");
_trans = this.GetTransition("t0");
}
public void setTime(string value)
{
_timeText.text = value;
}
public void setRead(bool value)
{
_readController.selectedIndex = value ? 1 : 0;
}
public void setFetched(bool value)
{
_fetchController.selectedIndex = value ? 1 : 0;
}
public void PlayEffect(float delay)
{
this.visible = false;
_trans.Play(1, delay, null);
}
}

View File

@@ -1,12 +0,0 @@
fileFormatVersion: 2
guid: 26140e87934f8754689c7bf2ac147fbe
timeCreated: 1446648219
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: