start画面button颜色动画添加
start画面button颜色动画添加 button颜色Changer修改为通用。
This commit is contained in:
parent
6dffd4185d
commit
904dc81c12
@ -1 +1 @@
|
||||
{"count":1,"self":23.63196,"total":23.9025009,"children":{"InitializeActuators":{"count":2,"self":0.00099739999999999985,"total":0.00099739999999999985,"children":null},"InitializeSensors":{"count":2,"self":0.001,"total":0.001,"children":null},"AgentSendState":{"count":952,"self":0.0085034,"total":0.039000099999999996,"children":{"CollectObservations":{"count":952,"self":0.0269949,"total":0.0269949,"children":null},"WriteActionMask":{"count":952,"self":0.0010012999999999999,"total":0.0010012999999999999,"children":null},"RequestDecision":{"count":952,"self":0.0025004999999999997,"total":0.0025004999999999997,"children":null}}},"DecideAction":{"count":952,"self":0.0075009,"total":0.0075009,"children":null},"AgentAct":{"count":952,"self":0.2215421,"total":0.2215421,"children":null}},"gauges":{"AKMAgent.CumulativeReward":{"count":1,"max":-915.46106,"min":-915.46106,"runningAverage":-915.46106,"value":-915.46106,"weightedAverage":-915.46106}},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1694173127","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 0aed42b0-3d5b-4374-942e-adccfa3e50fe -accessToken JbUPBPf6JTW37vb58Qn3jwtHKSeQe97cJMOu8VQWmC000ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Play","end_time_seconds":"1694173151"}}
|
||||
{"count":1,"self":17.467899199999998,"total":17.635640199999997,"children":{"InitializeActuators":{"count":2,"self":0.0009998,"total":0.0009998,"children":null},"InitializeSensors":{"count":2,"self":0.0015003999999999998,"total":0.0015003999999999998,"children":null},"AgentSendState":{"count":626,"self":0.0029987,"total":0.026095999999999998,"children":{"CollectObservations":{"count":626,"self":0.0160973,"total":0.0160973,"children":null},"WriteActionMask":{"count":626,"self":0.0020003,"total":0.0020003,"children":null},"RequestDecision":{"count":626,"self":0.0049997,"total":0.0049997,"children":null}}},"DecideAction":{"count":626,"self":0.0049999,"total":0.0049999,"children":null},"AgentAct":{"count":626,"self":0.1336431,"total":0.1336431,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1694248164","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 0aed42b0-3d5b-4374-942e-adccfa3e50fe -accessToken aawsLEtFkETWUEFg_3rpvdklhlZ5L56OYvt6FrHl5do00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Play","end_time_seconds":"1694248181"}}
|
@ -1 +1 @@
|
||||
{"count":1,"self":13.571579199999999,"total":13.7595613,"children":{"InitializeActuators":{"count":16,"self":0.0014984,"total":0.0014984,"children":null},"InitializeSensors":{"count":16,"self":0.00099899999999999989,"total":0.00099899999999999989,"children":null},"AgentSendState":{"count":138,"self":0.0040011,"total":0.0211731,"children":{"CollectObservations":{"count":1104,"self":0.01567,"total":0.01567,"children":null},"WriteActionMask":{"count":1104,"self":0.0005011,"total":0.0005011,"children":null},"RequestDecision":{"count":1104,"self":0.0010008999999999999,"total":0.0010008999999999999,"children":null}}},"DecideAction":{"count":138,"self":0.0009996,"total":0.0009996,"children":null},"AgentAct":{"count":138,"self":0.1633126,"total":0.1633126,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1690540829","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 4b63fb8e-9776-4262-b4cb-28aa0e369085 -accessToken Pb-uYo6-TCqI_VYWW4hD7qruW991NK-uVlSKxlTMxiM00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"StartScene","end_time_seconds":"1690540842"}}
|
||||
{"count":1,"self":77.1179712,"total":77.1915004,"children":{"InitializeActuators":{"count":2,"self":0.001501,"total":0.001501,"children":null},"InitializeSensors":{"count":2,"self":0.001,"total":0.001,"children":null},"AgentSendState":{"count":237,"self":0.0004998,"total":0.010502899999999999,"children":{"CollectObservations":{"count":237,"self":0.0080024,"total":0.0080024,"children":null},"WriteActionMask":{"count":237,"self":0,"total":0,"children":null},"RequestDecision":{"count":237,"self":0.0020007,"total":0.0020007,"children":null}}},"DecideAction":{"count":237,"self":0.0025017999999999998,"total":0.0025017999999999998,"children":null},"AgentAct":{"count":237,"self":0.0580262,"total":0.0580262,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1694254130","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 0aed42b0-3d5b-4374-942e-adccfa3e50fe -accessToken aawsLEtFkETWUEFg_3rpvdklhlZ5L56OYvt6FrHl5do00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"StartScene","end_time_seconds":"1694254207"}}
|
@ -1 +1 @@
|
||||
{"count":1,"self":6.8074992,"total":6.8110035999999994,"children":{"InitializeActuators":{"count":2,"self":0.0015007,"total":0.0015007,"children":null},"InitializeSensors":{"count":2,"self":0.0010002,"total":0.0010002,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1694173632","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 0aed42b0-3d5b-4374-942e-adccfa3e50fe -accessToken JbUPBPf6JTW37vb58Qn3jwtHKSeQe97cJMOu8VQWmC000ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Train","end_time_seconds":"1694173639"}}
|
||||
{"count":1,"self":8.9594696,"total":9.033501,"children":{"InitializeActuators":{"count":2,"self":0.001501,"total":0.001501,"children":null},"InitializeSensors":{"count":2,"self":0.001,"total":0.001,"children":null},"AgentSendState":{"count":237,"self":0.0004998,"total":0.010502899999999999,"children":{"CollectObservations":{"count":237,"self":0.0080024,"total":0.0080024,"children":null},"WriteActionMask":{"count":237,"self":0,"total":0,"children":null},"RequestDecision":{"count":237,"self":0.0020007,"total":0.0020007,"children":null}}},"DecideAction":{"count":237,"self":0.0025017999999999998,"total":0.0025017999999999998,"children":null},"AgentAct":{"count":237,"self":0.0580262,"total":0.0580262,"children":null}},"gauges":{},"metadata":{"timer_format_version":"0.1.0","start_time_seconds":"1694254130","unity_version":"2021.3.14f1","command_line_arguments":"C:\\Program Files\\Unity\\Hub\\Editor\\2021.3.14f1\\Editor\\Unity.exe -projectpath C:\\Users\\UCUNI\\OneDrive\\Unity\\ML-Agents\\Aimbot-ParallelEnv -useHub -hubIPC -cloudEnvironment production -licensingIpc LicenseClient-UCUNI -hubSessionId 0aed42b0-3d5b-4374-942e-adccfa3e50fe -accessToken aawsLEtFkETWUEFg_3rpvdklhlZ5L56OYvt6FrHl5do00ef","communication_protocol_version":"1.5.0","com.unity.ml-agents_version":"2.0.1","scene_name":"Train","end_time_seconds":"1694254139"}}
|
@ -150,7 +150,6 @@ GameObject:
|
||||
- component: {fileID: 7507962125065591824}
|
||||
- component: {fileID: 7507962125065591919}
|
||||
- component: {fileID: 6631082051945816225}
|
||||
- component: {fileID: 1651166592400170255}
|
||||
m_Layer: 5
|
||||
m_Name: LevelButton
|
||||
m_TagString: Untagged
|
||||
@ -275,42 +274,3 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
level: 0
|
||||
levelText: {fileID: 7507962124963951636}
|
||||
--- !u!114 &1651166592400170255
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 7507962125065591917}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 48f605c5c3d09384fa6b248789466476, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
normalTextColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4293717228
|
||||
normalBGColor:
|
||||
serializedVersion: 2
|
||||
rgba: 16777215
|
||||
highLightTextColor:
|
||||
serializedVersion: 2
|
||||
rgba: 3861457193
|
||||
highLightBGColor:
|
||||
serializedVersion: 2
|
||||
rgba: 1744830463
|
||||
pressedTextColor:
|
||||
serializedVersion: 2
|
||||
rgba: 4026531840
|
||||
pressedBGColor:
|
||||
serializedVersion: 2
|
||||
rgba: 2701131775
|
||||
disableTextColor:
|
||||
serializedVersion: 2
|
||||
rgba: 0
|
||||
disableBGColor:
|
||||
serializedVersion: 2
|
||||
rgba: 939524095
|
||||
colorChangeSpeed: 0.1
|
||||
clickable: 1
|
||||
text: {fileID: 0}
|
||||
|
@ -2893,7 +2893,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0.000030517578, y: -246.2018}
|
||||
m_AnchoredPosition: {x: 0.000030517578, y: -246.19905}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &324069808
|
||||
@ -12560,7 +12560,7 @@ MonoBehaviour:
|
||||
m_HandleRect: {fileID: 538300382}
|
||||
m_Direction: 2
|
||||
m_Value: 0
|
||||
m_Size: 1
|
||||
m_Size: 0.9999637
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
@ -21585,7 +21585,7 @@ MonoBehaviour:
|
||||
m_GameObject: {fileID: 2082200184}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 48f605c5c3d09384fa6b248789466476, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 3ca7ca2329898e343bafa8ba9db0cbb0, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
clickableButton:
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -6237,7 +6237,7 @@ MonoBehaviour:
|
||||
environmentUIControlObj: {fileID: 156390936}
|
||||
targetControllerObj: {fileID: 1692325237}
|
||||
HUDObj: {fileID: 2082200184}
|
||||
nowCam: {fileID: 1633276149}
|
||||
fpsCam: {fileID: 1633276149}
|
||||
moveSpeed: 9
|
||||
vX: 0
|
||||
vZ: 0
|
||||
@ -11125,7 +11125,7 @@ RectTransform:
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0, y: 1}
|
||||
m_AnchorMax: {x: 1, y: 1}
|
||||
m_AnchoredPosition: {x: 0.000030517578, y: -246.20218}
|
||||
m_AnchoredPosition: {x: 0.000030517578, y: -246.2022}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0, y: 0}
|
||||
--- !u!114 &1442113294
|
||||
@ -16267,7 +16267,7 @@ MonoBehaviour:
|
||||
m_HandleRect: {fileID: 1766662801}
|
||||
m_Direction: 2
|
||||
m_Value: 0
|
||||
m_Size: 0.99999416
|
||||
m_Size: 1
|
||||
m_NumberOfSteps: 0
|
||||
m_OnValueChanged:
|
||||
m_PersistentCalls:
|
||||
@ -18544,10 +18544,17 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
gameMode: 0
|
||||
attackProb: 0.3333333
|
||||
attackLevelProbs: []
|
||||
attackLevelProbs:
|
||||
- 1
|
||||
gotoProb: 0.33333334
|
||||
gotoLevelProbs: []
|
||||
defenceProb: 0.33333334
|
||||
gotoLevelProbs:
|
||||
- 0.2
|
||||
- 0.2
|
||||
- 0.2
|
||||
- 0.2
|
||||
- 0.1
|
||||
- 0.1
|
||||
defenceProb: 0
|
||||
defenceLevelProbs: []
|
||||
--- !u!4 &2141008730
|
||||
Transform:
|
||||
|
@ -5,7 +5,7 @@
|
||||
using UnityEngine.EventSystems;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class TargetButtonActivateColorChanger : MonoBehaviour
|
||||
public class ButtonActivateColorChanger : MonoBehaviour
|
||||
{
|
||||
public List<Button> clickableButton = new List<Button>();
|
||||
public List<Button> unclickableButton = new List<Button>();
|
||||
@ -133,7 +133,7 @@ public void ChangeInteractableColor(Button btn, bool changeTo)
|
||||
/// </summary>
|
||||
/// <param name="btn">The button object to add to the button list.</param>
|
||||
/// <param name="clickable">Indicates whether the button is clickable.</param>
|
||||
public void AddButtonToColorChangerButtonList(Button btn,bool clickable)
|
||||
public void AddButtonToColorChangerButtonList(Button btn, bool clickable)
|
||||
{
|
||||
if (clickable)
|
||||
{
|
||||
@ -149,7 +149,7 @@ public void AddButtonToColorChangerButtonList(Button btn,bool clickable)
|
||||
|
||||
public void InitializeAllButtonColor()
|
||||
{
|
||||
foreach(Button btn in clickableButton)
|
||||
foreach (Button btn in clickableButton)
|
||||
{
|
||||
btn.image.color = normalBGColor;
|
||||
btn.GetComponentInChildren<TextMeshProUGUI>().color = normalTextColor;
|
||||
@ -160,4 +160,4 @@ public void InitializeAllButtonColor()
|
||||
btn.GetComponentInChildren<TextMeshProUGUI>().color = disableTextColor;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 48f605c5c3d09384fa6b248789466476
|
||||
guid: 3ca7ca2329898e343bafa8ba9db0cbb0
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
@ -256,7 +256,7 @@ public void MoveAgentTo(Vector3 position)
|
||||
/// </remarks>
|
||||
private void RandomSpawnSceneBlock(SceneBlockContainer.Targets targetType)
|
||||
{
|
||||
randLevel = GetRandomLevelIndex(targetType);
|
||||
randLevel = RollRandomLevelIndex(targetType);
|
||||
randBlockType = Random.Range(0, sceneBlockCon.scenePrefabSet.GetBlockNumber(targetType,randLevel));
|
||||
sceneBlockSize = sceneBlockCon.scenePrefabSet.GetBlockSize(targetType, randLevel, randBlockType);
|
||||
|
||||
@ -638,7 +638,7 @@ public int GetInAreaState()
|
||||
/// </summary>
|
||||
/// <param name="target">The target type.</param>
|
||||
/// <returns>A random level index.</returns>
|
||||
public int GetRandomLevelIndex(SceneBlockContainer.Targets target)
|
||||
public int RollRandomLevelIndex(SceneBlockContainer.Targets target)
|
||||
{
|
||||
List<float> targetProbs;
|
||||
|
||||
|
@ -34,7 +34,7 @@ public class TargetUIController : MonoBehaviour
|
||||
private EnvironmentUIControl envUICon;
|
||||
private TargetController targetCon;
|
||||
private MessageBoxController messageBoxController;
|
||||
private TargetButtonActivateColorChanger buttonColorChanger;
|
||||
private ButtonActivateColorChanger buttonColorChanger;
|
||||
|
||||
public enum PrimaryButtonType
|
||||
{ Goto, Attack, Free }
|
||||
@ -47,7 +47,7 @@ private void Start()
|
||||
mouseInMapCon = mouseSelectorObj.GetComponent<MouseInMap>();
|
||||
envUICon = environmentUIObj.GetComponent<EnvironmentUIControl>();
|
||||
messageBoxController = GetComponent<MessageBoxController>();
|
||||
buttonColorChanger = GetComponent<TargetButtonActivateColorChanger>();
|
||||
buttonColorChanger = GetComponent<ButtonActivateColorChanger>();
|
||||
|
||||
gotoLevelPanel.GetComponent<LevelPanel>().InitLevelPanel(
|
||||
targetCon.gotoLevelNum,
|
||||
|
@ -11,6 +11,7 @@ public class StartUIManager : MonoBehaviour
|
||||
public TextMeshProUGUI waitTimeTextObj;
|
||||
private SceneLoader sceneLoader;
|
||||
private StartSeneData startSceneData;
|
||||
private ButtonActivateColorChanger buttonActivateColorChanger;
|
||||
private float startTime;
|
||||
private float nowTime;
|
||||
// Start is called before the first frame update
|
||||
@ -18,7 +19,9 @@ void Start()
|
||||
{
|
||||
sceneLoader = sceneLoaderObj.GetComponent<SceneLoader>();
|
||||
startSceneData = startSceneDataObj.GetComponent<StartSeneData>();
|
||||
buttonActivateColorChanger = GetComponent<ButtonActivateColorChanger>();
|
||||
messageTextObj.text = "";
|
||||
buttonActivateColorChanger.InitializeAllButtonColor();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
|
@ -9,13 +9,13 @@ EditorUserSettings:
|
||||
value: 55090405535008090b5608764626074415151c79747c74602b7c1861e4b96c6c
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-1:
|
||||
value: 5703025650035e5d090f087148715d4443161e2c7e2c20357b281b31b0e43060
|
||||
value: 06570c0704040b0e5a575520137b5e44154f192e292d22367c2c4866b7b3376f
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-2:
|
||||
value: 5453565f53020f085f5d0e72157a0844454f4c2b757d7265757a4f64b7b4313c
|
||||
flags: 0
|
||||
RecentlyUsedSceneGuid-3:
|
||||
value: 06570c0704040b0e5a575520137b5e44154f192e292d22367c2c4866b7b3376f
|
||||
value: 5703025650035e5d090f087148715d4443161e2c7e2c20357b281b31b0e43060
|
||||
flags: 0
|
||||
RecentlyUsedScenePath-0:
|
||||
value: 22424703114646680e0b0227036c6c111b07142f1f2b233e2867083debf42d
|
||||
|
Loading…
Reference in New Issue
Block a user