// Use this for initialization void Start () { _instance = this; transform.FindChild("start_btn").GetComponent<Button>().onClick.AddListener(StartBattle); transform.FindChild("back_btn").GetComponent<Button>().onClick.AddListener(BackClick); selected_map_index = 0; selected_map = maps[selected_map_index]; transform.FindChild("map").FindChild("left_btn").GetComponent<Button>().onClick.AddListener(SetPreviousMap); transform.FindChild("map").FindChild("right_btn").GetComponent<Button>().onClick.AddListener(SetNextMap); isShip = true; ToggleSide(); transform.FindChild("ship_btn").GetComponent<Button>().onClick.AddListener(delegate { SoundScript.Instance.PlaySound(SoundTitle.btn_click_snd); isShip = true; ToggleSide(); }); transform.FindChild ("submarine_off").GetComponent<Button> ().onClick.AddListener (HideSubmarineBanned); }
public ScriptRunningInstance(SingleScript scriptToRun) { ProgramCounter = new ProgramCounter(); VariablesManager = new VariablesManager(); ProgramCounter.SetScript(scriptToRun); }
public void SetScript(SingleScript script) { }
public void GetScriptDataReturnsTheDataPassedToTheConstructor() { var script = new SingleScript("Script Name", Encoding.ASCII.GetBytes("Hello World")); Encoding.UTF8.GetString(script.GetScriptBinary()).Should().Be("Hello World"); }
public void SingleScriptNameReturnsNameOfScript() { var script = new SingleScript("Script Name", Encoding.ASCII.GetBytes("Hello World")); script.Name.Should().Be("Script Name"); }