Ejemplo n.º 1
0
    void Awake()
    {
        if (Instance != null)
        {
            if (Instance != this)
                Destroy(this);
            return;
        }

        Instance = this;

        InitLayers();
    }
 public override void OnQuit()
 {
     LayersManager.FadeOut(0.25f, () =>
     {
         _aiPlayer.CustomMessage -= _aiPlayer_CustomMessage;
         Lock();
         _exitButton.SetActive(false);
         ((RectTransform)_countdown.transform).localScale = Vector2.one;
         _countdown.gameObject.SetActive(false);
         LayersManager.Pop();
         LayersManager.FadeIn(0.25f, null);
     });
 }
Ejemplo n.º 3
0
        internal override void OnFloatUp()
        {
            base.OnFloatUp();
            var newMapLayer = LayersManager.GetLayer <NewMapLayer>();

            if (!newMapLayer.OkPressed)
            {
                return;
            }
            _filenameField.text = newMapLayer.Filename;

            _map = new MapModel(newMapLayer.Width, newMapLayer.Height);
            CreateMapView();
        }
        private IEnumerator VersusRoutine(Action callback)
        {
            yield return(new WaitForSeconds(1.25f));

            LayersManager.FadeOut(0.25f, () =>
            {
                _animator.SetBool("Versus", false);
                if (callback != null)
                {
                    callback();
                }
                LayersManager.Pop(this);
                LayersManager.FadeIn(0.25f, null);
            });
        }
Ejemplo n.º 5
0
    void OnEnable()
    {
        lm = (LayersManager)target;

        layersNumber             = lm.layers.Count;
        layerIndex_init          = lm.layerIndex_init;
        layerTranformationOption = (LayerTransformationOptions)lm.layerTranformationOption;
        y_Offset = lm.Y_Offset;
        z_Offset = lm.Z_Offset;
        cylinderIntervalDegree = lm.CylinderIntervalDegree;
        cylinderRadius         = lm.CylinderRadius;
        switchSpeed            = lm.switchSpeed;
        useFakePespective      = lm.useFakePespective;

        Debug.Log("op: " + layerTranformationOption);
    }
Ejemplo n.º 6
0
    void Awake()
    {
        Fader.alpha = 1f;
        if (_instance != null)
        {
            Destroy(this.gameObject);
            return;
        }
        if (_DontDestroyOnLoad)
        {
            DontDestroyOnLoad(this.gameObject);
        }
        _instance  = this;
        _instances = new Dictionary <string, LayerBase>();
        _stack     = new List <LayerBase>();
        if (UiCanvas == null)
        {
            UiCanvas = GetComponent <Canvas>();
        }
        if (Container == null)
        {
            Container = UiCanvas.transform as RectTransform;
        }

        var preloadedLayers = new List <LayerBase>();

        for (int i = 0; i < Container.childCount; i++)
        {
            preloadedLayers.Add(Container.GetChild(i).GetComponent <LayerBase>());
        }
        foreach (var layer in preloadedLayers)
        {
            _instances.Add(layer.GetType().Name, layer);
            layer.Instantiate();
            layer.gameObject.SetActive(false);
        }
        if (preloadedLayers.Count > 0)
        {
            Push(preloadedLayers[0]);
        }
    }
Ejemplo n.º 7
0
 public ToolsManager(LayersManager layersManager, ViewportManager viewPortManager)
 {
     _layersManager   = layersManager;
     _viewportManager = viewPortManager;
     _loadtoolsWork   = new BackgroundWorker();
 }
Ejemplo n.º 8
0
 protected override bool IsEnableLayer(LayersManager manager, int layerID)
 {
     return(manager.IsPhysicsLayer(LayerID));
 }
Ejemplo n.º 9
0
 public void OnOk()
 {
     OkPressed = true;
     LayersManager.Pop();
 }
Ejemplo n.º 10
0
 protected override void ResetIgnoreCollision(LayersManager manager)
 {
     manager.ResetIgnoreCollision(this);
 }
Ejemplo n.º 11
0
 private void Start()
 {
     _camera      = Camera.main;
     _canvasGroup = GetComponent <CanvasGroup>();
     LayersManager.FadeIn(0.5f, null);
 }
Ejemplo n.º 12
0
 public void OnNew()
 {
     LayersManager.Push <NewMapLayer>();
 }
Ejemplo n.º 13
0
 void Start()
 {
     LayersManager.Push <MainMenuLayer>();
     LayersManager.FadeIn(0.5f, null);
 }
Ejemplo n.º 14
0
 public void ScreenCaptured(ImageSource img)
 {
     SetWindowActive();
     ViewportManager.ImageChanged(img);
     LayersManager.AddNewLayer(img);
 }
Ejemplo n.º 15
0
 public virtual void OnQuit()
 {
     LayersManager.Pop(this);
 }
Ejemplo n.º 16
0
 void Start()
 {
     LayersManager.Push <BackgroundLayer>();
     LayersManager.FadeIn(1f, () => LayersManager.Push <MainMenuLayer>());
 }
Ejemplo n.º 17
0
 public override void OnQuit()
 {
     LayersManager.FadeOut(0.5f, () => Application.Quit());
 }
Ejemplo n.º 18
0
 protected abstract bool IsEnableLayer(LayersManager manager, int layerID);
Ejemplo n.º 19
0
 protected abstract void UnManagement(LayersManager manager);
Ejemplo n.º 20
0
 protected override void UnManagement(LayersManager manager)
 {
     manager.UnManagement(this);
 }
Ejemplo n.º 21
0
 protected abstract void ResetIgnoreCollision(LayersManager manager);
Ejemplo n.º 22
0
 public MoverTool(ViewportManager viewportManager, LayersManager layersManager)
     : base(ResourceConstants.PointerMoverResource, ResourceConstants.PointerMoverToolTip, ResourceConstants.PointerToolsGroup, layersManager, viewportManager)
 {
 }
Ejemplo n.º 23
0
 void Start()
 {
     lm = layerManager.GetComponent <LayersManager>();
     pc = playerCharacter.GetComponent <PlayerController>();
 }