void ModifyFogSize(AdvCommandSendMessageByName command) { float size = command.ParseCellOptional <float>(AdvColumnName.Arg3, 1f); child.GetComponent <D2FogsPE>().Size = size; //Debug.Log("success size change"); }
void ModifyFogColor(AdvCommandSendMessageByName command) { float r = command.ParseCellOptional <float>(AdvColumnName.Arg3, 0f); float g = command.ParseCellOptional <float>(AdvColumnName.Arg4, 0f); float b = command.ParseCellOptional <float>(AdvColumnName.Arg5, 0f); float a = command.ParseCellOptional <float>(AdvColumnName.Arg6, 1f); Color c = new Color(r, g, b, a); child.GetComponent <D2FogsPE>().Color = c; //Debug.Log("success size color"); }
IEnumerator CoWait(AdvCommandSendMessageByName command) { command.IsWait = true; float time = command.ParseCellOptional <float>(AdvColumnName.Arg3, 0); while (true) { Debug.Log(time); time -= Time.deltaTime; if (time <= 0) { break; } yield return(0); } command.IsWait = false; }
//シナリオからコマンドを呼んで切り替える void SetEnableAdvertise(AdvCommandSendMessageByName command) { this.isAdOpen = command.ParseCellOptional <bool>(AdvColumnName.Arg3, false); }
//引数を使った例 void TestWait(AdvCommandSendMessageByName command) { StartCoroutine(CoWait(command)); }
//引数を使った例 void TestArg(AdvCommandSendMessageByName command) { Debug.Log(command.ParseCellOptional <string>(AdvColumnName.Arg3, "arg3")); }
//Testという処理を呼ぶ。引数にはAdvCommandSendMessageByNameを持つ void Test(AdvCommandSendMessageByName command) { Debug.Log("SendMessageByName"); }
void EnableFog(AdvCommandSendMessageByName command) { child.GetComponent <D2FogsPE>().enabled = true; //Debug.Log("success enable fog"); }
// Update is called once per frame void DisableFog(AdvCommandSendMessageByName command) { child.GetComponent <D2FogsPE>().enabled = false; }
public void ShowMenu(AdvCommandSendMessageByName command) { m_MainMenuCanvas.gameObject.SetActive(true); m_WarNode.RefreshData(); }