Exemple #1
0
 public void PrepareSelectedObjectToReceiveBehavior()
 {
     if (selectedObject == -1)
     {
         DebugMessage.ErrorMessage(TranslationManager.GetMessage("SelectObjectFirst"));
         PanelLoadBg.AbortLoadStatic();
         return;
     }
     Debug.Log("Preparing object " + selectedObjectName + " to receive behavior.");
     PanelLoadBg.SetProgrammableObjectStatic(GetIthObjectInSceneTransform(selectedObject).GetComponent <ProgrammableObject>());
 }
Exemple #2
0
 void Start()
 {
     if (myAnimator == null)
     {
         myAnimator = this.gameObject.GetComponent <Animator>();
     }
     if (mydropdown == null)
     {
         mydropdown = this.gameObject.GetComponentInChildren <Dropdown>();
     }
     instance = this;
     this.gameObject.SetActive(false);
 }
    public void LoadCode(Dropdown sourceCode)
    {
        int result = -1;

        result = PanelLoadBg.TryToLoadCodeToProgrammableObjectStatic(sourceCode);
        if (result != 0 && sourceCodeComponent != null)
        {
            result = sourceCodeComponent.LoadCode(sourceCode);
        }
        if (result == 0)
        {
            DebugMessage.SuccessMessage(TranslationManager.GetMessage("LoadedSuccessfully"));
        }
        else
        {
            DebugMessage.ErrorMessage(TranslationManager.GetMessage("ErrorLoading"));
        }
        PanelLoadBg.ExitAnimation();
    }
Exemple #4
0
 public void PrepareSourceCodeEditorToReceiveBehavior()
 {
     PanelLoadBg.SetProgrammableObjectStatic(null);
 }
Exemple #5
0
 void Start()
 {
     if (myAnimator == null)
         myAnimator = this.gameObject.GetComponent<Animator>();
     if (mydropdown == null)
         mydropdown = this.gameObject.GetComponentInChildren<Dropdown>();
     instance = this;
     this.gameObject.SetActive(false);
 }