Skip to content

Instantly share code, notes, and snippets.

View dilmerv's full-sized avatar
😎
I love to code and can do it all day long ;)

Dilmer Valecillos ᯅ dilmerv

😎
I love to code and can do it all day long ;)
View GitHub Profile
@dilmerv
dilmerv / MAC_Build_Sign_Game.sh
Created March 29, 2017 05:21
MAC_Build_Sign_Game.sh
#!/bin/bash
echo "Copying provisioning profile..."
cp ./embedded.provisionprofile ./YourGameName.app/Contents/
echo "Starting Signing..."
codesign -f --deep -s "3rd Party Mac Developer Application: [Your Name]" --entitlements "./YourGameName.entitlements" ./YourGameName.app/Contents/Frameworks/MonoEmbedRuntime/osx/libmono.0.dylib
codesign -f --deep -s "3rd Party Mac Developer Application: [Your Name]" --entitlements "./YourGameName.entitlements" ./YourGameName.app/Contents/Frameworks/MonoEmbedRuntime/osx/libMonoPosixHelper.dylib
codesign -f --deep -s "3rd Party Mac Developer Application: [Your Name]" --entitlements YourGameName.entitlements "./YourGameName.app/"
echo "Done Signing..."
@dilmerv
dilmerv / YourGameName.entitlements
Created March 29, 2017 05:19
YourGameName.entitlements
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.developer.game-center</key>
<true/>
</dict>
</plist>
@dilmerv
dilmerv / MAC_Build_Plist_Example.plist
Created March 29, 2017 05:11
MAC_Build_Plist_Example.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>[YourGameName]</string>
<key>CFBundleGetInfoString</key>
<string>Your Game Name (c) 2017 Dilmer Games. All rights reserved.</string>
void GlueToStairs ()
{
if (!groundHit || IM.Jump_Button () || !isStair || Mathf.Abs(move) > 0)
this.transform.GetComponent<Rigidbody2D> ().isKinematic = false;
else if (groundHit && isStair)
this.transform.GetComponent<Rigidbody2D> ().isKinematic = true;
}
using UnityEngine;
using System.Collections;
using UnityEditor;
using System.IO;
using System;
public class LevelScreenshot: EditorWindow {
// Quality Settings
enum Quality {
high = 4, Medium = 3, Normal = 2, Low = 1
//This method goes in your character controller
//CharacterController.cs
void GlueToFloor ()
{
if (Mathf.Abs (move) > 0 || !groundHit || IM.Jump_Button ()) {
this.transform.GetComponent<Rigidbody2D> ().isKinematic = false;
}
else if (groundHit && Mathf.Abs (move) == 0 && !isPlatform) {
this.transform.GetComponent<Rigidbody2D> ().isKinematic = true;
}