void InitEditModes()
    {
        firstPersonMode.Init(editionGO, undoGO, snapGO, freeMovementGO, builderInWorldEntityHandler.GetSelectedEntityList());
        editorMode.Init(editionGO, undoGO, snapGO, freeMovementGO, builderInWorldEntityHandler.GetSelectedEntityList());

        firstPersonMode.OnInputDone += InputDone;
        editorMode.OnInputDone      += InputDone;

        firstPersonMode.OnActionGenerated += actionController.AddAction;
        editorMode.OnActionGenerated      += actionController.AddAction;
    }
Пример #2
0
    public void EntitySelectDeselect()
    {
        Assert.IsFalse(entity.IsSelected);
        entityHandler.SelectEntity(entity);
        Assert.IsTrue(entity.IsSelected);

        Assert.AreEqual(entityHandler.GetSelectedEntityList().Count, 1);
        Assert.AreEqual(entityHandler.GetSelectedEntityList().FirstOrDefault(), entity);

        entityHandler.DeselectEntity(entity);
        Assert.IsFalse(entity.IsSelected);
    }
Пример #3
0
    public void Init(GameObject editionGO, GameObject undoGO, GameObject snapGO, GameObject freeMovementGO)
    {
        base.Init();
        this.editionGO = editionGO;
        this.undoGO    = undoGO;

        firstPersonMode.Init(editionGO, undoGO, snapGO, freeMovementGO, builderInWorldEntityHandler.GetSelectedEntityList());
        editorMode.Init(editionGO, undoGO, snapGO, freeMovementGO, builderInWorldEntityHandler.GetSelectedEntityList());

        firstPersonMode.OnInputDone += InputDone;
        editorMode.OnInputDone      += InputDone;

        firstPersonMode.OnActionGenerated += actionController.AddAction;
        editorMode.OnActionGenerated      += actionController.AddAction;

        if (HUDController.i.builderInWorldMainHud != null)
        {
            HUDController.i.builderInWorldMainHud.OnChangeModeAction += ChangeAdvanceMode;
            HUDController.i.builderInWorldMainHud.OnResetAction      += ResetScaleAndRotation;
        }
    }