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); }
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); }
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); }
public Block () { id = 0; isSolid = false; isSchraege = false; rotation = RotationTypes.None; schraegenType = SchraegenTypes.None; allowedSchraege = true; destroyForce = 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]); } }
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; } } }
public static Rotation CreateRotation(RotationTypes rotationType) { var rotation = new Rotation { RotationType = rotationType }; AssignBaseObjectProperties(rotation); return rotation; }
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; } } }
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; }