コード例 #1
0
    // -http://forum.unity3d.com/threads/add-component-to-3d-object-with-parameters-to-constructor.334757/
    public static InteractiveController addToGameObject(MainObject mainObject)
    {
        GameObject            gameObject            = GameObject.Find(mainObject.ObjectName);
        InteractiveController interactiveController = gameObject.AddComponent <InteractiveController>();

        interactiveController.mainObject = mainObject;
        return(interactiveController);
    }
コード例 #2
0
 protected void interactiveProcessing(SceneInfo sceneInfo)
 {
     foreach (MainObject mainObject in sceneInfo.mainObjects)
     {
         InteractiveController interactiveController = InteractiveController.addToGameObject(mainObject);
         interactiveController.interactiveCallBack     = interactiveCallBack;
         interactiveController.displayTextUiController = displayTextUiController;
     }
 }
コード例 #3
0
 public abstract void Interact(InteractiveController controller);