Inheritance: MonoBehaviour
 //Start is called before the first frame update
 void Start()
 {
     sprite           = GetComponent <SpriteRenderer>();
     keyCounter       = 0;
     canvasController = GameObject.FindGameObjectWithTag("Canvas").GetComponent <CanvasController>();
     currentHealth    = maxHealth;
 }
        private Vector3 PositionForCanvasControllerAtLocation(CanvasController canvasController,
                                                              OffScreenLocation location)
        {
            Vector3 position = Vector3.zero;

            switch (location)
            {
            case OffScreenLocation.Left:
            {
                position = canvasController.OffScreenLeftContentPosition();
                break;
            }

            case OffScreenLocation.Top:
            {
                position = canvasController.OffScreenTopContentPosition();
                break;
            }

            case OffScreenLocation.Right:
            {
                position = canvasController.OffScreenRightContentPosition();
                break;
            }

            case OffScreenLocation.Bottom:
            {
                position = canvasController.OffScreenBottomContentPosition();
                break;
            }
            }

            return(position);
        }
 public DlgDebugWindow(CanvasController controller)
 {
     this.controller = controller;
     InitializeComponent();
     PopulateWithShapes();
     tvShapes.ExpandAll();
 }
Exemple #4
0
 // Start is called before the first frame update
 void Start()
 {
     //get reference to audio
     m_audio = GameObject.FindGameObjectWithTag("Audio").GetComponent <AudioControlScript>();
     //get reference to Canvas controller
     m_canvas = GameObject.FindGameObjectWithTag("Canvas").GetComponent <CanvasController>();
 }
Exemple #5
0
 protected void InitializeControllers()
 {
     canvasController = new CanvasController(canvas, elements);
     canvasController.ElementSelected += (snd, args) => UpdateMenu(args.Element != null);
     toolboxController = new ToolboxController(toolboxCanvas, toolboxElements, canvasController);
     uiController      = new UIController(pgElement, canvasController);
 }
Exemple #6
0
 public void UpdateHand()
 {
     UpdateOrder();
     UpdateCurrentCapacity();
     CanvasController.UpdateCapacity(currentCapacity);
     CanvasController.UpdateMoney(FindTotalValue());
 }
Exemple #7
0
 protected override void Awake()
 {
     base.Awake();
     _player = FindObjectOfType <PlayerBehaviour>();
     _enemy  = FindObjectOfType <Enemy>();
     _canvas = FindObjectOfType <CanvasController>();
 }
Exemple #8
0
    // Use this for initialization
    void Start()
    {
        numberOfFriendlyUnits = 0;
        numberOfEnemyUnits    = 0;
        health           = 50;
        fightingUnitCost = 5;
        fighting         = false;
        spawnSpot        = new Vector3(transform.position.x - (transform.GetComponent <MeshRenderer>().bounds.extents.x * 1.5f), transform.position.y, transform.position.z - (transform.GetComponent <MeshRenderer>().bounds.extents.z *1.005f));
        scaleOfWorld     = GameObject.Find("Scaler").transform.localScale.x;
        x_offset         = 0;
        z_offset         = -15f * scaleOfWorld;


        if (this.name == "Cube_A")
        {
            enemyBase     = GameObject.Find("Cube_B").transform;
            usableMines   = GameObject.Find("Mines_A");
            summoningZone = GameObject.Find("SummoningZone_A").transform;
        }
        else if (this.name == "Cube_B")
        {
            enemyBase     = GameObject.Find("Cube_A").transform;
            usableMines   = GameObject.Find("Mines_B");
            summoningZone = GameObject.Find("SummoningZone_B").transform;
        }

        enemyCastleScript      = enemyBase.GetComponent <CastleClick>();
        canvasControllerScript = GameObject.FindObjectOfType <Canvas>().GetComponent <CanvasController>();
    }
    private void Start()
    {
        this.canvasController = this.canvas.GetComponent <CanvasController>();
        this.shopController   = this.shop.GetComponent <ShopController>();

        StartCoroutine(DisableImageTargets());
    }
Exemple #10
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
 }
Exemple #11
0
 // Methods
 private void Start()
 {
     rb         = GetComponent <Rigidbody>();
     sprites[0] = bionicArm;
     sprites[1] = placeHolder;
     controller = canvas.GetComponent <CanvasController>();
 }
 private void Start()
 {
     SetDayCycle(true);
     playerTransform = PlayerSingleton.instance.transform;
     playerControls  = playerTransform.GetComponent <CharacterControls>();
     canvas          = CanvasController.instance;
 }
Exemple #13
0
    void Awake()
    {
        WorldName   = CanvasController.GetWorldName();
        width       = 16;
        length      = 16;
        height      = 150;
        AddHeight   = 80;
        ReadyStatus = false;
        SavePath    = Application.persistentDataPath;

        SnowBlock    = "SnowBlock";
        CoalOreBlock = "CoalOreBlock";
        GoldOreBlock = "GoldOreBlock";
        IronOreBlock = "IronOreBlock";
        StoneBlock   = "StoneBlock";
        DirtBlock    = "DirtBlock";
        GrassBlock   = "GrassBlock";

        SnowBlockObject    = Resources.Load("SnowBlock");
        CoalOreBlockObject = Resources.Load("CoalOreBlock");
        GoldOreBlockObject = Resources.Load("GoldOreBlock");
        IronOreBlockObject = Resources.Load("IronOreBlock");
        StoneBlockObject   = Resources.Load("StoneBlock");
        DirtBlockObject    = Resources.Load("DirtBlock");
        GrassBlockObject   = Resources.Load("GrassBlock");

        Seed             = GameObject.FindGameObjectWithTag("Player").GetComponent <ChunksController>().Seed;
        ChunkBlocks      = new Block[width, height, length];
        IsShowen         = false;
        IsDelete         = false;
        IsExited         = File.Exists(Application.persistentDataPath + "/Saves/" + WorldName + "/chunks/" + gameObject.transform.position.x + "/" + gameObject.transform.position.z + ".dat");
        heightMultiplier = GameObject.FindGameObjectWithTag("Player").GetComponent <ChunksController>().heightmultiplier;
        ObjectsTrasform  = gameObject.transform;
        //CreateChunk();
    }
Exemple #14
0
    // Use this for initialization
    void Start()
    {
        cbMemeCreated += ShowDebug;

        timer.cbTimesUp += OnTimeUp;
        canvasController = FindObjectOfType <CanvasController>();
    }
 protected void Awake()
 {
     instance         = this;
     lastActiveCanvas = new CanvasController();
     desiredCanvas    = new CanvasController();
     SwitchCanvas(CanvasType.MainMenu);
 }
    IEnumerator SweepCanvasOutBottom(CanvasController canvas)
    {
        LeanTween.moveLocalY(canvas.gameObject.transform.GetChild(0).gameObject, -Screen.height * 2, .5f);
        yield return(new WaitForSeconds(.5f));

        SetLastCanvasFalse(canvas);
    }
    IEnumerator Start()
    {
        CanvasController = GameObject.Find("TextCanvas").GetComponent <CanvasController> ();

        //		print ("Waiting for storyobjects to be ready");
//		yield return new WaitUntil (() => {
//			return GetComponentsInChildren<GetString> ().Length != 0;
//		});
        //		print ("storyobjects ready");

        yield return(new WaitForSeconds(1.1f));

        TriggerRoomGeneration[] doors = transform.parent.GetComponentsInChildren <TriggerRoomGeneration> ();

        foreach (var door in doors)           // finding the first door withour connection
        {
            if (!door.GetComponent <TriggerRoomGeneration> ().hasBeenConnected)
            {
//				print ("found story controller door hook " + door.direction);
                door.setColor(Color.black);
                door.otherDoor.setColor(Color.black);
                door.hasBeenConnected           = true;
                door.otherDoor.hasBeenConnected = true;
                door.connectedToComp            = true;
                door.otherDoor.connectedToComp  = true;
                doorHook = door;
                break;
            }
        }
    }
Exemple #18
0
 // Use this for initialization
 void Start()
 {
     canvasController = GameObject.Find("MainCanvas").GetComponent <CanvasController>();
     player           = GameObject.Find("Player").transform;
     playerValues     = player.GetComponent <PlayerValues>();
     nav = GetComponent <UnityEngine.AI.NavMeshAgent>();
 }
Exemple #19
0
 public void Hit(WorldController wc, Card c)
 {
     wc.p.H.TotalCapacity = -2;
     CanvasController.UpdateMaxCapacity(wc.p.H.TotalCapacity);
     wc.displayMessage.Display("The " + wc.e.Name + " injured you.", wc.canvas, wc.aControl.enemyAttack);
     wc.p.H.DisableCards();
 }
    public IEnumerator usePowerupInvincible(PlayerController _targetPlayer)
    {
        if (_targetPlayer.canTakeStatusEffect())
        {
            invincibleSound.Play();

            _targetPlayer.m_hasStatusEffect = true;
            CanvasController canvas = _targetPlayer.m_canvas.GetComponent <CanvasController>();
            canvas.changeStatusEffectIcon(Powerup.PowerupType.Invincible);

            MeshRenderer forceFieldMesh = _targetPlayer.forceField.GetComponent <MeshRenderer>();

            _targetPlayer.m_isInvincible = true;
            forceFieldMesh.enabled       = true;

            // wind the ring down
            float elapsedTime = 0.0f;
            while (elapsedTime < m_invincibleTime)
            {
                canvas.setStatusEffectRingPerc(1.0f - (elapsedTime / m_invincibleTime));

                elapsedTime += Time.deltaTime;
                yield return(new WaitForEndOfFrame());
            }

            _targetPlayer.m_isInvincible = false;
            forceFieldMesh.enabled       = false;

            _targetPlayer.m_hasStatusEffect = false;
            canvas.setStatusEffectRingPerc(1.0f);
            _targetPlayer.m_canvas.GetComponent <CanvasController>().clearStatusEffectIcon();
        }

        //_targetPlayer.m_canvas.GetComponent<CanvasController>().clearPowerupIcon();
    }
Exemple #21
0
    void Awake()
    {
        canvas = gameObject.GetComponent <CanvasController>();
        Rect camRect = new Rect(screenOffset.left,
                                screenOffset.bottom, Screen.width - screenOffset.horizontal, Screen.height - screenOffset.vertical);

        canvasConfig = canvas.config;



        if (texture == null)
        {
            canvasConfig.canvasSize = new IntVector2(1024, 768);
        }
        else
        {
            canvasConfig.canvasSize = new IntVector2(texture.width, texture.height);
        }

        CanvasCameraConfig camConfig = new CanvasCameraConfig();

        camConfig.camMinSize      = 10;
        camConfig.screenPixelRect = camRect;
        canvas.initialize(canvasConfig, camConfig, texture);

        testDrawing();
        oldWidth  = Screen.width;
        oldHeight = Screen.height;
    }
Exemple #22
0
    private void Awake()
    {
        canvasController = CanvasController.instance;

        currentEnergy = 100;
        currentHunger = 100;
    }
Exemple #23
0
 public void Drag(WorldController wc, Card c)
 {
     wc.Distance = 3;
     CanvasController.UpdateDistance(wc.Distance);
     wc.displayMessage.Display("The " + wc.e.name + " dragged you backwards 3!", wc.canvas, wc.aControl.enemyAttack);
     wc.p.H.DisableCards();
 }
Exemple #24
0
 private void Awake()
 {
     I = this;
     GameManager.I.OnGameStateChanged += OnGameStateChanged;
     GameManager.I.OnCardDragStarted  += OnCardDragStarted;
     GameManager.I.OnPointsChanged    += OnPointsChanged;
 }
 private void Start()
 {
     this.canvasController    = this.canvas.GetComponent <CanvasController>();
     this.copyPreparationTime = this.preparationTime;
     this.pooler     = ObjectPooler.Instance;
     this.helpCanvas = GameObject.FindGameObjectWithTag("Help");
 }
Exemple #26
0
    public void Init(Game game)
    {
        Game = game;

        PhpController = GetComponent <PhpController>();
        PhpController.Init(this);

        GameSparksController = GetComponent <GameSparksController>();

        // we do this after the success of obtaining a game sessionId handshake
        //GameSparksController.Init(this);

        Transform[] allChildren = GetComponentsInChildren <Transform>(true);
        foreach (Transform child in allChildren)
        {
            switch (child.name)
            {
            case "<body":
                CanvasController = child.GetComponent <CanvasController>();
                break;

            default:
                break;
            }
        }
        CanvasController.Init(this);
    }
Exemple #27
0
    // Update is called once per frame
    void Update()
    {
        if (Input.touchCount == 0)
        {
            return;
        }
        Touch touch = Input.GetTouch(0);

        if (IsPointerOverUIObject(touch.position))
        {
            return;
        }
        if (raycastManager.Raycast(touch.position, hits) && co < 1)
        {
            Pose _pose = hits[0].pose;
            var  c     = Instantiate(model, _pose.position, Quaternion.identity);
            canvasController = c.GetComponentInChildren <CanvasController>();
            _nubmeInstance   = c.GetComponentInChildren <NubmeInstance>();
            c.GetComponentInChildren <LineMover>().SendMessage("GetVector", _pose.position);
            canvasController.CollapseVectors(_pose.position);
            _nubmeInstance.InstanceNums(_pose.position);
            //Debug.Log("number instance " + _nubmeInstance.ToString());
            //Debug.Log("co" + co);
            co += 1;
        }
    }
Exemple #28
0
    // Update is called once per frame
    void Update()
    {
        TimerController timetext1 = Timetext.GetComponent <TimerController>();


        //ボールが画面外に出た場合
        if (this.transform.position.z < this.visiblePosZ)
        {
            this.gameover = true;

            if (timetext1.totaltime > 0 && timetext1.timeup == false)
            {
                //GameoverTextにゲームオーバを表示
                this.gameoverText.GetComponent <Text>().text = "Game Over";

                //フリッパー付属スクリプト呼び出しと変数変更PC
                FripperController fripper1 = this.Fripper1.GetComponent <FripperController>();
                fripper1.gameplay = false;

                FripperController fripper2 = this.Fripper2.GetComponent <FripperController>();
                fripper2.gameplay = false;

                //フリッパー付属スクリプト呼び出しと変数変更Android
                TouchSystem fripper11 = this.Fripper1.GetComponent <TouchSystem>();
                fripper11.gameplay = false;

                TouchSystem fripper22 = this.Fripper2.GetComponent <TouchSystem>();
                fripper22.gameplay = false;

                //retry

                CanvasController.SetActive("RetryButton", true);
            }
        }
    }
Exemple #29
0
 public RoundCompeteState(StateMachine <Round.RoundStates> sm, Dictionary <uint, ChefRoom> chefsInPlay, GameSettings gs, CanvasController canCon)
     : base(sm, Round.RoundStates.Compete)
 {
     this.chefsInPlay = chefsInPlay;
     this.gs          = gs;
     this.canCon      = canCon;
 }
Exemple #30
0
 // Start is called before the first frame update
 void Start()
 {
     isMapVisible = true; //false; //TEMP//initially birdCam is enabled, topDown cam is disabled
     setChildrenActive(mapView, false);
     birdCam.enabled = true;
     cc = GameObject.Find("ActionsCanvas").GetComponent <CanvasController>();
 }
	void Awake (){
		if(instance){
			DestroyImmediate(gameObject);
			return;
		}
		instance = this;
		DontDestroyOnLoad(gameObject);
	}
 public void setTopLeftPosition(int left, int top, GUISkin skin)
 {
     canvas = PropertiesSingleton.instance.canvasWorkspaceController.canvas;
     props = PropertiesSingleton.instance;
     setStyle(skin, config.styleName, out config.style);
     config.left = left;
     config.top = top;
     recalculatePositions();
 }
Exemple #33
0
    public void setTopLeftOffset(int x, int y, GUISkin skin)
    {
        canvas = PropertiesSingleton.instance.canvasWorkspaceController.canvas;
        setStyle(skin, config.styleName,out config.style);

        config.top  = y;
        config.left = x;
        recalculatePositions();
    }
 void Awake()
 {
     props = PropertiesSingleton.instance;
     em = WorkspaceEventManager.instance;
     canvas = GetComponent<CanvasController>();
     createCanvas();
     prebuildCanvasCamConfig();
     ScreenSizeController.onResolutionChange += onResolutionChangeListener;
     em.onSheetChange += onSheetChangeListener;
     em.onPicIconeClick += onPictureIconClickListener;
 }
Exemple #35
0
    void Start()
    {
        canvas = GameObject.Find ("Canvas");
        canvasComponent = canvas.GetComponent<Canvas> ();
        canvasController = canvas.GetComponent<CanvasController> ();

        book.room = "1";
        book.wall = 1;
        book.shelf = 1;
        book.volume = 1;
        book.page = 1;
    }
Exemple #36
0
    public void setProperties(int left, int top, int contentWidth, int contentHeight, int margin, GUISkin skin)
    {
        propSingleton = PropertiesSingleton.instance;
        canvas = propSingleton.canvasWorkspaceController.canvas;
        this.left = left;
        this.top = top;
        this.margin = margin;
        this.contentWidth = contentWidth;
        this.contentHeight = contentHeight;

        horizontalScrollHeight =(int) skin.FindStyle("horizontalscrollbar").fixedHeight;

        verticalScrollWidth    =(int) skin.FindStyle("verticalscrollbar").fixedWidth;
        recalculatePositions();
    }
 public LineStrategyImpl(CanvasTool tool, InterpoalateStrategyInterface interpolateStrategy)
 {
     this.tool = tool;
     this.interpolateStrategy  = interpolateStrategy  ;
     canvasConfig = PropertiesSingleton.instance.canvasWorkspaceController.canvas.config;
     canvas = PropertiesSingleton.instance.canvasWorkspaceController.canvas;
     canvasCam = canvas.canvasCamera.camera;
     switch (tool.meshType){
     case LineMeshType.SQUARE_SIDES:
         lineRendererMeshType = new SquareSideLineMeshTypeImpl();
         break;
     case LineMeshType.TRIANGLE_SIDES:
         lineRendererMeshType = new TriangleSideLineMeshTypeImpl();
         break;
     }
 }
Exemple #38
0
    void Awake()
    {
        canvas = gameObject.GetComponent<CanvasController>();
        Rect camRect = new Rect(screenOffset.left,
                                screenOffset.bottom, Screen.width - screenOffset.horizontal, Screen.height - screenOffset.vertical);

        canvasConfig = canvas.config;

        if (texture == null)
            canvasConfig.canvasSize = new IntVector2(1024,768);
        else
            canvasConfig.canvasSize = new IntVector2(texture.width, texture.height);

        CanvasCameraConfig camConfig = new CanvasCameraConfig();
        camConfig.camMinSize = 10;
        camConfig.screenPixelRect = camRect;
        canvas.initialize(canvasConfig, camConfig, texture);

        testDrawing();
        oldWidth = Screen.width;
        oldHeight = Screen.height;
    }
Exemple #39
0
 private void Awake()
 {
     canvas = this;
 }
    // Use this for initialization
    void Start()
    {
        maze = new Maze();

        mazeParent = new GameObject("Maze");

        //spawnedTiles = new List<Transform>();
        spawnedFragments = new List<GameObject>();

        canvas = FindObjectOfType<CanvasController>();

        UnityEngine.Random.InitState(System.DateTime.UtcNow.TimeOfDay.Seconds);

        GenerateLevel((uint)UnityEngine.Random.Range(int.MinValue, int.MaxValue));
    }
	public CanvasTransitionContext (CanvasController sender, CanvasController receiver, object data) {
		this.SendingViewController = sender;
		this.ReceivingViewController = receiver;
		this.Data = data;
	}
Exemple #42
0
	protected void TransitionToCanvas (CanvasController canvas, CanvasTransitionStyle style = CanvasTransitionStyle.Instant, object contextData = null) {
		if (this.IsSubcanvas) {
			this.parentCanvasController.TransitionToCanvas(canvas, style, contextData);
		} else {
			if (canvas.IsSubcanvas) {
		 		Debug.LogError("Cannot transition to a child CanvasController");
		 		return;
		 	}
			StartCoroutine(this.TransitionToCanvasCoroutine(canvas, style, contextData));
		}
	}
Exemple #43
0
    // Use this for initialization
    void Start()
    {
        currentScore = GameObject.Find("CurrentScore").GetComponent<CurrentScore>();
        fullScore = GameObject.FindObjectOfType<FullScore>();
        score = GetComponent<Score>();
        energy = GetComponent<Energy>();
        energyLine = GameObject.FindObjectOfType<EnergyLine>();
        inputController = GameObject.FindObjectOfType<InputController>();
        timerScript = GameObject.FindObjectOfType<TimerScript>();
        timerUI = GameObject.FindObjectOfType<TimerUI>();
        info = GetComponent<Info>();
        taskStrings = GetComponent<TaskStrings>();
        pauseButton = GameObject.FindObjectOfType<PauseButton>().gameObject;
        pauseMenu = GameObject.Find("Canvas").GetComponentInChildren<PauseMenu>();
          //  endMenu = GameObject.FindObjectOfType<EndMenu>();
        taskHelper = GameObject.FindObjectOfType<TaskHelper>();
        globalController = GetComponent<GlobalController>();
        cam = GameObject.Find("MainCamera");
        secondCamera = GameObject.Find("SecondCamera");
        wordRideCanvas = GameObject.FindObjectOfType<WordRideCanvas>();

        metalSparksPrefab = Resources.Load("Prefabs/Particles/MetalSpark") as GameObject;
        carUserParametres = GetComponent<CarUserParametres>();
        gameUI = GameObject.FindObjectOfType<GameUI>();
        canvasController = GameObject.FindObjectOfType<CanvasController>();

        particleCanvas = GameObject.Find("ParticleCanvas");
        carCreator = GameObject.FindObjectOfType<CarCreator>();

        mainBonus = GameObject.FindObjectOfType<MainBonus>();

        waitBackground = GameObject.FindObjectOfType<WaitBackground>();
    }
Exemple #44
0
	protected void AddSubcanvas (CanvasController subCC) {
		this.HasSubcanvases = true;
		if (this.subcanvasControllers == null) {
			this.subcanvasControllers = new List<CanvasController>();
		}
		this.subcanvasControllers.Add(subCC);
		subCC.ParentCanvasController = this;
	}
Exemple #45
0
	private IEnumerator TransitionToCanvasCoroutine (CanvasController cc, CanvasTransitionStyle style, object contextData) {
		CanvasTransitionContext context = new CanvasTransitionContext(this, cc, contextData);

		this.CanvasWillHide();
		cc.CanvasWillShow(context);

		switch (style) {

		case CanvasTransitionStyle.Instant:
			this.Canvas.enabled = false;
			this.CanvasGroup.alpha = 0;
			cc.Canvas.enabled = true;
			cc.CanvasGroup.alpha = 1;
			this.CanvasDidHide();
			cc.CanvasDidShow();

			yield return new WaitForEndOfFrame();
			break;

		case CanvasTransitionStyle.CrossFade:
			cc.Canvas.enabled = true;
			CrossFadeCanvasGroup(this.CanvasGroup, 0, 0.4f);
			CrossFadeCanvasGroup(cc.CanvasGroup, 1, 0.4f);
			yield return new WaitForSeconds(0.4f);

			this.CanvasDidHide();
			cc.CanvasDidShow();
			this.Canvas.enabled = false;
			break;

		case CanvasTransitionStyle.SlideUp:
			yield return new WaitForEndOfFrame();
			break;

		case CanvasTransitionStyle.Scale:
			yield return new WaitForEndOfFrame();
			break;
	
		}
	}
Exemple #46
0
 void Awake()
 {
     Current = this;
 }
Exemple #47
0
	protected IEnumerator ShowSubcanvasCoroutine (CanvasController subCC, SubcanvasShowStyle style, object context = null) {
		CanvasTransitionContext ctContext = new CanvasTransitionContext(this, subCC, context);
		subCC.CanvasWillShow(ctContext);

		switch (style) {
		case SubcanvasShowStyle.Instant:
			yield return new WaitForEndOfFrame();
			subCC.Canvas.enabled = true;
			subCC.CanvasGroup.alpha = 1;
			subCC.CanvasDidShow();
			break;
		case SubcanvasShowStyle.FadeIn:
			subCC.Canvas.enabled = true;
			CrossFadeCanvasGroup(subCC.CanvasGroup, 1, 0.4f);
			yield return new WaitForSeconds(0.4f);
			subCC.CanvasDidShow();
			break;
		}
	}
Exemple #48
0
	public static void ShowFirstCanvas (CanvasController canvas) {
		if (!CanvasController.hasShownFirstCanvas) {
			canvas.ShowAsFirstView();
			CanvasController.hasShownFirstCanvas = true;
		}
	}
Exemple #49
0
	private IEnumerator HideSubcanvasCoroutine (CanvasController subCC, SubcanvasHideStyle style, object context = null) {
		subCC.CanvasWillHide();

		switch (style) {
		case SubcanvasHideStyle.Instant:
			yield return new WaitForEndOfFrame();
			subCC.Canvas.enabled = false;
			subCC.CanvasGroup.alpha = 0;
			subCC.CanvasDidHide();
			break;
		case SubcanvasHideStyle.FadeOut:
			CrossFadeCanvasGroup(subCC.CanvasGroup, 0, 0.4f);
			yield return new WaitForSeconds(0.4f);
			subCC.Canvas.enabled = false;
			subCC.CanvasDidHide();
			break;
		}
	}
Exemple #50
0
	protected void HideSubcanvas (CanvasController subCC, SubcanvasHideStyle style, object context = null) {
		if (subCC.ParentCanvasController != this) {
			Debug.LogError("Cannot show a subcanvas that is not a child of this CanvasController");
			return;
		}
		StartCoroutine(HideSubcanvasCoroutine(subCC, style, context));
	}
 public ToolHandStrategyImpl()
 {
     canvas = PropertiesSingleton.instance.canvasWorkspaceController.canvas;
 }
 public ToolBucketStrategyImpl()
 {
     canvas = PropertiesSingleton.instance.canvasWorkspaceController.canvas;
     canvasConfig = canvas.config;
     props = PropertiesSingleton.instance;
 }