コード例 #1
0
	// 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);        
    }
コード例 #2
0
 public ScriptRunningInstance(SingleScript scriptToRun)
 {
     ProgramCounter   = new ProgramCounter();
     VariablesManager = new VariablesManager();
     ProgramCounter.SetScript(scriptToRun);
 }
コード例 #3
0
 public void SetScript(SingleScript script)
 {
 }
コード例 #4
0
        public void GetScriptDataReturnsTheDataPassedToTheConstructor()
        {
            var script = new SingleScript("Script Name", Encoding.ASCII.GetBytes("Hello World"));

            Encoding.UTF8.GetString(script.GetScriptBinary()).Should().Be("Hello World");
        }
コード例 #5
0
        public void SingleScriptNameReturnsNameOfScript()
        {
            var script = new SingleScript("Script Name", Encoding.ASCII.GetBytes("Hello World"));

            script.Name.Should().Be("Script Name");
        }