您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
35 行
1000 B
35 行
1000 B
using UnityEngine;
|
|
|
|
namespace GameplayIngredients.Actions
|
|
{
|
|
[AddComponentMenu(ComponentMenu.actionsPath + "Game Manager : Send Startup Message Action")]
|
|
[Callable("Game", "GameManager Icon.png")]
|
|
public class GameManagerSendStartupMessageAction : ActionBase
|
|
{
|
|
public enum MessageType
|
|
{
|
|
MainMenuStart,
|
|
GameLevelStart,
|
|
}
|
|
|
|
public MessageType messageType;
|
|
|
|
public override void Execute(GameObject instigator = null)
|
|
{
|
|
switch(messageType)
|
|
{
|
|
case MessageType.GameLevelStart:
|
|
Messager.Send(GameManager.GameLevelStartMessageID);
|
|
break;
|
|
case MessageType.MainMenuStart:
|
|
Messager.Send(GameManager.MainMenuStartMessageID);
|
|
break;
|
|
}
|
|
}
|
|
|
|
public override string GetDefaultName()
|
|
{
|
|
return $"Game Manager Send : {messageType}";
|
|
}
|
|
}
|
|
}
|