Exemplo n.º 1
0
    protected override void WrapScreenDirection(WrapDirection wrapDirection, float counterDir)
    {
        if (!isWrapping)
        {
            switch (wrapDirection)
            {
            case WrapDirection.WRAP_LEFT:
                opposeAxisMove.x = counterDir;
                opposeAxisMove.y = transform.position.y;
                break;

            case WrapDirection.WRAP_RIGHT:
                opposeAxisMove.x = counterDir;
                opposeAxisMove.y = transform.position.y;
                break;

            case WrapDirection.WRAP_TOP:
                opposeAxisMove.y = counterDir;
                opposeAxisMove.x = transform.position.x;
                break;

            case WrapDirection.WRAP_BOTTOM:
                opposeAxisMove.y = counterDir;
                opposeAxisMove.x = transform.position.x;
                break;
            }

            Player playerWrapped = Instantiate(this, opposeAxisMove, transform.rotation);
            playerWrapped.isWrapping = true;
            isWrapping = true;
            playerWrapped.rb2D.velocity = rb2D.velocity;
            playerWrapped.name          = name;
            Destroy(gameObject, 0.5f);
        }
    }
Exemplo n.º 2
0
        private static bool IsValidWrapDirection(object o)
        {
            WrapDirection value = (WrapDirection)o;

            return(value == WrapDirection.None ||
                   value == WrapDirection.Left ||
                   value == WrapDirection.Right ||
                   value == WrapDirection.Both);
        }
        /// <summary>
        /// Animated Layout Panel constructor.
        /// </summary>
        public AnimatedLayoutPanel()
        {
            // Create internal event handlers
            this.SizeChanged += new SizeChangedEventHandler(this.AnimatedLayoutPanel_SizeChanged);

            // Set initial property values
            this.wrapDirection            = WrapDirection.Horizontal;
            this.startPosition            = EntranceStartPosition.TopLeft;
            this.TransitionDuration       = TimeSpan.FromMilliseconds(200);
            this.AnimateOnInitialise      = true;
            this.EntranceAnimationEnabled = true;
            this.ItemResizeHeight         = 50;
            this.ItemResizeWidth          = 50;
            this.ItemMargin = new Thickness(5);
        }
        /// <summary>
        /// Animated Layout Panel constructor.
        /// </summary>
        public AnimatedLayoutPanel()
        {
            // Create internal event handlers
            this.SizeChanged += new SizeChangedEventHandler(this.AnimatedLayoutPanel_SizeChanged);

            // Set initial property values
            this.wrapDirection = WrapDirection.Horizontal;
            this.startPosition = EntranceStartPosition.TopLeft;
            this.TransitionDuration = TimeSpan.FromMilliseconds(200);
            this.AnimateOnInitialise = true;
            this.EntranceAnimationEnabled = true;
            this.ItemResizeHeight = 50;
            this.ItemResizeWidth = 50;
            this.ItemMargin = new Thickness(5);
        }
Exemplo n.º 5
0
        // Token: 0x06002CAD RID: 11437 RVA: 0x000C964C File Offset: 0x000C784C
        private static bool IsValidWrapDirection(object o)
        {
            WrapDirection wrapDirection = (WrapDirection)o;

            return(wrapDirection == WrapDirection.Both || wrapDirection == WrapDirection.None || wrapDirection == WrapDirection.Left || wrapDirection == WrapDirection.Right);
        }
Exemplo n.º 6
0
Arquivo: Pts.cs Projeto: JianwenSun/cc
 internal static FSKCLEAR WrapDirectionToFskclear(WrapDirection wrapDirection)
 {
     FSKCLEAR fskclear;
     switch (wrapDirection)
     {
         case WrapDirection.None:
             fskclear = FSKCLEAR.fskclearNone;
             break;
         case WrapDirection.Left:
             fskclear = FSKCLEAR.fskclearLeft;
             break;
         case WrapDirection.Right:
             fskclear = FSKCLEAR.fskclearRight;
             break;
         case WrapDirection.Both:
             fskclear = FSKCLEAR.fskclearBoth;
             break;
         default:
             Debug.Assert(false, "Unknown WrapDirection value.");
             fskclear = FSKCLEAR.fskclearNone;
             break;
     }
     return fskclear;
 }
Exemplo n.º 7
0
Arquivo: Pts.cs Projeto: JianwenSun/cc
 internal static FSKWRAP WrapDirectionToFskwrap(WrapDirection wrapDirection)
 {
     return (PTS.FSKWRAP)((int)wrapDirection);
 }
Exemplo n.º 8
0
 protected virtual void WrapScreenDirection(WrapDirection wrapDirection, float counterDir)
 {
 }