InitStringController() public method

Inits the string controller.
public InitStringController ( string StringFilePath ) : bool
StringFilePath string String file path.
return bool
Ejemplo n.º 1
0
 void Awake()
 {
     StringControl = new StringController();
     StringControl.InitStringController("c:\\shock_strings.txt");
     //Debug.Log (StringControl.GetString (2151,037));
     Words.sc = StringControl;
 }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        StringControl = new StringController();
        StringControl.InitStringController("c:\\uw1_strings.txt");
        //Initialise some basic references on other objects.
        //ObjectInteraction.player=this.gameObject;//Set the player controller for all interaction scripts.
        //ObjectInteraction.SC=StringControl;
        //a_text_string_trap.SC=StringControl;
        //	ButtonHandler.SC=StringControl;
        //ObjectInteraction.SC = GameObject.Find ("StringController").GetComponent<StringController>();
        //ButtonHandler.player=this.gameObject;
        //InventorySlot.player=this.gameObject;
        InventorySlot.playerUW  = this.GetComponent <UWCharacter>();
        ActiveRuneSlot.playerUW = this.GetComponent <UWCharacter>();
        RuneSlot.playerUW       = this.GetComponent <UWCharacter>();

        //TODO:Shock character
        //WindowDetect.playerUW=this.GetComponent<UWCharacter>();

        XAxis             = GetComponent <MouseLook>();
        YAxis             = transform.FindChild("Main Camera").GetComponent <MouseLook>();
        Screen.lockCursor = true;

        MessageLog = (UILabel)GameObject.FindWithTag("MessageLog").GetComponent <UILabel>();

        //Debug.Log ("Setting player to " + this.gameObject);
        //Cursor.SetCursor (CursorIcon,Vector2.zero, CursorMode.ForceSoftware);
        //ObjectInteraction.player=this.gameObject;//Set the player controller for all interaction scripts.
        //InventorySlot.player=this.gameObject;
        //InventorySlot.playerUW=this.GetComponent<UWCharacter>();
        //CursorIcon=(Texture2D)Resources.Load("Assets/HUD/cursors/cursors_0000.tga",typeof(Texture2D));
        //Debug.Log ("the player is " + ObjectInteraction.player.name);
        Cursor.SetCursor(CursorIconBlank, Vector2.zero, CursorMode.ForceSoftware);
        //Rect Position = new Rect(Event.current.mousePosition.x-cursorSizeX/2,Event.current.mousePosition.y-cursorSizeY/2,cursorSizeX,cursorSizeY);
        //GUI.DrawTexture (Position,CursorIcon);
    }