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
| /// <summary> | |
| /// Gets a sprite from any path | |
| /// </summary> | |
| /// <returns>The sprite from WW.</returns> | |
| /// <param name="fullPath">Full path.</param> | |
| public static Sprite getSpriteFromWWW (string fullPath, bool packTight = false) | |
| { | |
| fullPath = "file:///" + fullPath; | |
| WWW wwwLoader = new WWW (fullPath); | |
| //Debug.Log ("loading texture " + fullPath + " via www, loaded: " + www); |
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; | |
| // script according to the talk at unit2013 : https://www.youtube.com/watch?v=Ozc_hXzp_KU | |
| public class ValidateMe05 : MonoBehaviour | |
| { | |
| private const float minFloatValue = 0.1f; | |
| private const float maxFloatValue = 15f; |
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 EnemyAnimationControl : MonoBehaviour | |
| { | |
| private Animator animControl; | |
| private GameObject attackCollider; | |
| private GameObject checkCollider; |
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
| private AudioSource playlistSource; | |
| playlistCont = PlayListController.Instance; | |
| playlistSource = playlistCont.CurrentPlaylistSource; | |
| if (usePitchAddtion) { | |
| checkAddPitch (); | |
| } else { | |
| checkPitchChange (); |
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 IEnumerator ImpactVibration (float enemyDirection) | |
| { | |
| float vibTime = 0.5f; | |
| float impVibStart = 0.1f; | |
| float impVibStrength = 0.35f; | |
| doVibrate = true; | |
| StartCoroutine (DoVibrate ()); | |
| if (enemyDirection > 0) { | |
| StartCoroutine (setVibrate (0, vibTime, impVibStart, impVibStrength, "setLeftVibrate")); |
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 System; | |
| /* | |
| * main.cpp - spectrum_analyzer | |
| * https://bitbucket.org/andor44/spectrum_analyzer | |
| * | |
| * Copyright (c) 2011 TÖRÖK Attila <torokati44@gmail.com> | |
| * | |
| * This software is provided 'as-is', without any express or implied | |
| * warranty. In no event will the authors be held liable for any damages |
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
| // copy & past from see: https://www.youtube.com/watch?v=VH0ZfEv_ouc | |
| using UnityEngine; | |
| using System.Collections; | |
| public class Player : MonoBehaviour | |
| { | |
| //attach 2 weapon prefabs to weapon1 and weapon2 | |
| //attach a bone Transform (head, foot, hand etc..) from your |
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
| if (!isWallInFront (moveDirection)) { | |
| this.rigidbody.MovePosition (this.rigidbody.position + this.transform.right * xAxis * xFacing); | |
| } | |
| private bool isWallInFront (Vector3 direction) | |
| { | |
| if (UnityShortcuts.castRay (this.rigidbody.position, this.transform.right, rayCastLength, moveAlignLayer)) { | |
| //Debug.Log ("got wall hit!"); |
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; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System; | |
| public static class UnityShortcuts | |
| { |
NewerOlder