Exemplo n.º 1
0
 private void addMLGameStateParamUpdater()
 {
     if (mlGameState.GetComponent <MLGameStateParamUpdater>())
     {
         Debug.Log("There already is an MLGameStateParamUpdater attached");
         return;
     }
     ComponentHelper.AddIfNotPresent <MLGameStateParamUpdater>(mlGameState.transform);
 }
Exemplo n.º 2
0
 private void addMLUpdaterSet()
 {
     if (mlGameState.GetComponent <MLUpdaterSet>())
     {
         Debug.Log("There already is an MLUpdaterSet");
         return;
     }
     ComponentHelper.AddIfNotPresent <MLUpdaterSet>(mlGameState.transform);
 }
Exemplo n.º 3
0
    private void Start()
    {
        box.gameObject.SetActive(true);
        int i = 0;

        foreach (Button b in buttons)
        {
            ComponentHelper.AddIfNotPresent <DialogButton>(b.transform).index = i++;
        }
        box.gameObject.SetActive(false);
    }
Exemplo n.º 4
0
    protected override void _Awake()
    {
        base._Awake();
        gameStateSaver.type = MLGameSavedStateType.DONT_SAVE;
        MLGameStateParamUpdater paramUpdater = ComponentHelper.AddIfNotPresent <MLGameStateParamUpdater>(transform);

        if (addUpdater)
        {
            MLUpdaterSet updaterSet = ComponentHelper.AddIfNotPresent <MLUpdaterSet>(transform);
            updaterSet.setUpdaters(paramUpdater);
        }
    }
Exemplo n.º 5
0
 static void addUpdatersAndSets()
 {
     if (Selection.gameObjects.Length == 0)
     {
         print("nothing selected");
     }
     foreach (GameObject go in Selection.gameObjects)
     {
         if (go.GetComponent <MLGameState>())
         {
             ComponentHelper.AddIfNotPresent <MLGameStateParamUpdater>(go.transform);
             ComponentHelper.AddIfNotPresent <MLUpdaterSet>(go.transform);
         }
     }
 }
Exemplo n.º 6
0
 public void Start()
 {
     ComponentHelper.AddIfNotPresent <DragDrop>(transform);
 }