This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using UnityEditor; | |
using System; | |
using System.Collections.Generic; | |
public class SetRendererLayerWizard : ScriptableWizard { | |
public Renderer renderer; | |
public Renderer[] rendererList; | |
public SortingLayer sortingLayer; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Export Layers as PNG files with original layer structure | |
var options = new ExportOptionsPNG24(); | |
var doc = app.activeDocument; | |
$.writeln("trying to save"); | |
var newdoc = app.documents.add(doc.documentColorSpace, doc.width, doc.height); | |
newdoc.artboards[0].artboardRect = doc.artboards[0].artboardRect; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
[RequireComponent(typeof(Rigidbody2D))] | |
public class KevinController : MonoBehaviour { | |
public float maxSpeed = 10f; | |
public float groundCheckRadius = 0.1f; | |
public LayerMask groundCechkLayerMask; | |
public float jumpForce = 100f; | |
public float runJumpForce = 200f; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// enstead of this | |
GUIUtility.RotateAroundPivot(angle, | |
new Vector2(brushRect.x + brushRect.width * relativePivot.x, | |
brushRect.y + brushRect.height * relativePivot.y) | |
); | |
/////// should use | |
Matrix4x4 getMatrix(Rect rect){ | |
Matrix4x4 result; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
map $http_user_agent $limit_bots { | |
default ''; | |
~*(google|bing|yandex|msnbot|wordpress) $binary_remote_addr; | |
} | |
limit_req_zone $limit_bots zone=bots:10m rate=1r/m; | |
server { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class LiftingPlatformController : MonoBehaviour { | |
public float routeLenght = 10; | |
public float verticalSpeed = 10; | |
[Range (0,1)] | |
public float startRelativePosition=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HorizontalMovePlatformController : MonoBehaviour { | |
public float routeLenght = 10; | |
public float horizontalSpeed = 10; | |
[Range (0,1)] | |
public float startRelativePosition=0; | |
public bool goRight; | |
Vector3 basePosition, remotePosition; | |
void Start(){ | |
basePosition = transform.position; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections; | |
public class MobilePlatformController: MonoBehaviour { | |
public Vector2 route; | |
public float timePerCycle = 2.0f; | |
[Range (0,2)] | |
public float startRelativePosition=0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
static PointsRegion __newPointsRegion; | |
static int __yy,__xx; | |
static bool __prevPixelSeed; | |
private static void scanUpBelowPixelsRegionForward (ref int xLeft, ref int xRight, ref int baseY, ref int maxY, ref PointsRegion pointsRegion, | |
ref Color32[,] colors, ref bool[,] persistentBorder, ref Color32 seedColor, ref Queue queue, bool[,] resultRegion) { | |
__newPointsRegion = new PointsRegion (); | |
__yy = baseY + pointsRegion.direction; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System.Collections.Generic; | |
public class IosBuildList : ScriptableObject{ | |
public List<IosBuildConfig> configs; | |
} |
OlderNewer