Exemplo n.º 1
0
    void SetRotation(RotationTypes rotationInput)
    {
        rotationType = rotationInput;

        switch (rotationType)
        {
        case RotationTypes.Move:
            MoveRotation();
            break;

        case RotationTypes.Dash:
            DashRotation();
            break;

        case RotationTypes.Throw:
            ThrowRotation();
            break;

        case RotationTypes.BasicAttack:
            BasicAttackRotation();
            break;

        default:
            break;
        }

        playerTransform.rotation = Quaternion.Euler(0, playerTransform.rotation.eulerAngles.y, 0);
    }
Exemplo n.º 2
0
        public void Rotate(RotationTypes rotationType)
        {
            gridBasedObject.Rotation = (RotationTypes)(((int)gridBasedObject.Rotation + (int)rotationType) % 4);
            RotateFlipType type = RotateFlipType.RotateNoneFlipNone;

            switch (rotationType)
            {
            case RotationTypes.Rotate_0:
                break;

            case RotationTypes.Rotate_90:
                type = RotateFlipType.Rotate90FlipNone;
                break;

            case RotationTypes.Rotate_180:
                type = RotateFlipType.Rotate180FlipNone;
                break;

            case RotationTypes.Rotate_270:
                type = RotateFlipType.Rotate270FlipNone;
                break;

            default:
                break;
            }
            previewImage.RotateFlip(type);
        }
Exemplo n.º 3
0
        public Grid Rotate(Grid axis, RotationTypes rotationType)
        {
            int  rotate90Count = (int)rotationType;
            Grid rotatedGrid   = new Grid(X, Y);

            for (int index = 0; index < rotate90Count; index++)
            {
                rotatedGrid = rotatedGrid.Rotate90(axis);
            }
            return(rotatedGrid);
        }
Exemplo n.º 4
0
    public Block () {
        id = 0;
        isSolid = false;
        isSchraege = false;
        rotation = RotationTypes.None;
        schraegenType = SchraegenTypes.None;
        allowedSchraege = true;

        destroyForce = 0;

    }
Exemplo n.º 5
0
 public void Rotate(T axis, RotationTypes rotationType)
 {
     T[] array = ToArray();
     matrix.Clear();
     for (int index = 0; index < array.Length; index++)
     {
         Grid rotatedGrid = array[index].Rotate(axis, rotationType);
         array[index].X = rotatedGrid.X;
         array[index].Y = rotatedGrid.Y;
         AddElement(array[index]);
     }
 }
Exemplo n.º 6
0
    public void setMetaData ( RotationTypes _rot, SchraegenTypes _schraegenType ) {

        if ( allowedSchraege ) {

            Rotation = _rot;
            SchraegenType = _schraegenType;

            if ( Rotation == RotationTypes.None && SchraegenType == SchraegenTypes.None ) {
                IsSchraege = false;
            }
            else {
                IsSchraege = true;
            }
        }
    }
Exemplo n.º 7
0
 public static Rotation CreateRotation(RotationTypes rotationType)
 {
     var rotation = new Rotation { RotationType = rotationType };
       AssignBaseObjectProperties(rotation);
       return rotation;
 }
Exemplo n.º 8
0
    public void setSchraegenData ( RotationTypes _rot, SchraegenTypes _schraegenType ) {

        if ( allowedSchraege ) {

            rotation = _rot;
            schraegenType = _schraegenType;

            if ( rotation == RotationTypes.None && schraegenType == SchraegenTypes.None ) {
                isSchraege = false;
            }
            else {
                isSchraege = true;
            }
        }
    }
Exemplo n.º 9
0
    public Block ( Block temp ) {

        id = temp.id;
        isSolid = temp.IsSolid;
        isSchraege = temp.IsSchraege;
        allowedSchraege = temp.allowedSchraege;

        rotation = temp.Rotation;
        schraegenType = temp.SchraegenType;

        destroyForce = temp.DestroyForce;

    }