示例#1
0
        public override void SetUpPlayArea(BAnchorInformation[] bAnchorInformation)
        {
            // TODO: Wait for some frames ?


            if (ARE_EQUAL(bAnchorInformation.Length, 2))
            {
                PlayAreaState = EPlayAreaState.SETTING_ANCHORS;

                // Spawn BAnchors
                for (int i = 0; i < 2; i++)
                {
                    PlayAreaBAnchor playAreaBAnchor = AddNewChildBAnchor(false);
                    if (IS_NOT_NULL(playAreaBAnchor))
                    {
                        playAreaBAnchor.gameObject.name += "_" + (i + 1);
                        playAreaBAnchor.SetTransformedPosition(bAnchorInformation[i].TransformedPosition);
                        playAreaBAnchor.SetTransformedRotation(bAnchorInformation[i].TransformedRotation);
                    }
                }

                // Finalize
                setAnchorsCount = 2;
                SetExtentPoints();
                DrawPlayAreaExtensions();
                FinalizePlayAreaSetup();
            }
        }