Skip to content

Commit

Permalink
添加项目
Browse files Browse the repository at this point in the history
  • Loading branch information
WheatDew committed Aug 3, 2020
1 parent e731c31 commit 0391fc5
Show file tree
Hide file tree
Showing 100 changed files with 12,364 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Assets/Extra.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Extra/Schedule.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Extra/Schedule/Prefabs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

216 changes: 216 additions & 0 deletions Assets/Extra/Schedule/Prefabs/ScheduleItem.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,216 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6400259782316855099
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6400259782316855096}
- component: {fileID: 6400259782316855094}
- component: {fileID: 6400259782316855097}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6400259782316855096
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6400259782316855099}
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_Children: []
m_Father: {fileID: 6400259782368783672}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 25, y: 0}
m_SizeDelta: {x: -50, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6400259782316855094
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6400259782316855099}
m_CullTransparentMesh: 0
--- !u!114 &6400259782316855097
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6400259782316855099}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 40
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 3
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: "\u65B0\u4EFB\u52A1"
--- !u!1 &6400259782368783675
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6400259782368783672}
- component: {fileID: 6400259782368783671}
- component: {fileID: 6400259782368783670}
- component: {fileID: 6400259782368783673}
- component: {fileID: 761903350555272853}
m_Layer: 5
m_Name: ScheduleItem
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &6400259782368783672
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6400259782368783675}
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_Children:
- {fileID: 6400259782316855096}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 1080, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &6400259782368783671
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6400259782368783675}
m_CullTransparentMesh: 0
--- !u!114 &6400259782368783670
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6400259782368783675}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &6400259782368783673
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6400259782368783675}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 6400259782368783670}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!114 &761903350555272853
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6400259782368783675}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ecc3f78d26d21f648ac1d640771aba58, type: 3}
m_Name:
m_EditorClassIdentifier:
title:
content:
completeness:
displayText: {fileID: 6400259782316855097}
7 changes: 7 additions & 0 deletions Assets/Extra/Schedule/Prefabs/ScheduleItem.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions Assets/Extra/Schedule/Scripts.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions Assets/Extra/Schedule/Scripts/ColorBox.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ColorBox : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{

}

// Update is called once per frame
void Update()
{

}
}
11 changes: 11 additions & 0 deletions Assets/Extra/Schedule/Scripts/ColorBox.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 88 additions & 0 deletions Assets/Extra/Schedule/Scripts/DetailPage.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.UIElements;

public class DetailPage : MonoBehaviour
{
public InputField titleText, contentText;
public GameObject colorBoxRed,colorBoxOrange,colorBoxGreen;

public SchedulePage schedulePage;

private ScheduleItem bindingScheduleItem;
private string boxColorString;
private Color boxColor=Color.white;

public void SetBoxColor(string colorName)
{
switch (colorName)
{
case "red":
colorBoxRed.SetActive(true);
colorBoxOrange.SetActive(false);
colorBoxGreen.SetActive(false);
boxColor = new Color(1f,0.5f,0.5f,0.5f);
boxColorString = "red";
break;
case "orange":
colorBoxRed.SetActive(false);
colorBoxOrange.SetActive(true);
colorBoxGreen.SetActive(false);
boxColor = new Color(1f, 0.5f, 0f,0.5f);
boxColorString = "orange";
break;
case "green":
colorBoxRed.SetActive(false);
colorBoxOrange.SetActive(false);
colorBoxGreen.SetActive(true);
boxColor = new Color(0.5f, 1f, 0.5f, 0.5f);
boxColorString = "green";
break;
}
}

public void SetContent(string title,string content,string color,ScheduleItem scheduleItem)
{
titleText.text = title;
contentText.text = content;
bindingScheduleItem = scheduleItem;
switch (color)
{
case "red":
colorBoxRed.SetActive(true);
colorBoxOrange.SetActive(false);
colorBoxGreen.SetActive(false);
break;
case "orange":
colorBoxRed.SetActive(false);
colorBoxOrange.SetActive(true);
colorBoxGreen.SetActive(false);
break;
case "green":
colorBoxRed.SetActive(false);
colorBoxOrange.SetActive(false);
colorBoxGreen.SetActive(true);
break;
}
}

public void SetScheduleItemContent()
{
bindingScheduleItem.SetItemDispalyText(titleText.text,boxColor);
bindingScheduleItem.title = titleText.text;
bindingScheduleItem.content = contentText.text;
bindingScheduleItem.completeness = boxColorString;
boxColor = Color.white;
colorBoxRed.SetActive(false);
colorBoxOrange.SetActive(false);
colorBoxGreen.SetActive(false);
}

public void BackLastPage()
{
schedulePage.gameObject.SetActive(true);
gameObject.SetActive(false);
}
}
11 changes: 11 additions & 0 deletions Assets/Extra/Schedule/Scripts/DetailPage.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0391fc5

Please sign in to comment.