This file contains 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
<div id="navmenu"> | |
<ul> | |
<li class="page_item page-item-16"><a href="http://learn.areyoudevoted.com/?page_id=16">home</a></li> | |
<li class="page_item page-item-6"><a href="http://learn.areyoudevoted.com/?page_id=6">teachers</a></li> | |
<li class="page_item page-item-88"><a href="http://learn.areyoudevoted.com/?page_id=88">classes</a></li> | |
<li class="page_item page-item-1078"><a href="http://learn.areyoudevoted.com/?page_id=1078">programs</a></li> |
This file contains 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
<div id="navmenu"> | |
<ul> | |
<li class="page_item page-item-16"><a href="http://learn.areyoudevoted.com/?page_id=16">home</a></li> | |
<li class="page_item page-item-6"><a href="http://learn.areyoudevoted.com/?page_id=6">teachers</a></li> | |
<li class="page_item page-item-88"><a href="http://learn.areyoudevoted.com/?page_id=88">classes</a></li> | |
<li class="page_item page-item-1078"><a href="http://learn.areyoudevoted.com/?page_id=1078">programs</a></li> |
This file contains 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
void OnCollisionEnter(Collision theCollision){ | |
if(theCollision.gameObject.name == "Floor"){ | |
Debug.Log("Hit the floor"); | |
}else if(theCollision.gameObject.name == "Wall"){ | |
Debug.Log("Hit the wall"); | |
} |
This file contains 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
void OnCollisionEnter(Collision theCollision){ | |
if(theCollision.gameObject.name == "Floor"){ | |
Debug.Log("Hit the floor"); | |
}else if(theCollision.gameObject.name == "Wall"){ | |
Debug.Log("Hit the wall"); | |
} | |
} |
This file contains 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
void OnTriggerEnter (Collider myTrigger) { | |
if(myTrigger.gameObject.name == "box"){ | |
Debug.Log("Box went through!"); | |
} | |
} |
This file contains 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 RayCastExample : MonoBehaviour { | |
// Use this for initialization | |
void Start () { | |
} |
This file contains 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 Texture2D normalTex; | |
public Texture2D hoverTex; | |
void OnMouseEnter () { | |
guiTexture.texture = hoverTex; | |
} | |
void OnMouseExit(){ | |
guiTexture.texture = normalTex; |
This file contains 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 int Counter = 0; | |
void Update () { | |
Counter++; | |
guiText.text = "Counter is: "+Counter; | |
} |
This file contains 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
/* Polymoprhism allows for objects to be dynamically switched on runtime because | |
each object extending the root type Pet can be used interchangably. You can think of polymorphism as allowing each object to share a type and a set of functions but to be able ot switch for each other in code based on what you need. | |
You know every object extending that root object will implement all methods marked abstract and be able touse all methods that are defined. The Abstract functionality gets you around having to instantiate the abstract object. | |
*/ | |
Cat cat; | |
Dog dog; | |
Pet currentPet; | |
int counter = 0; | |
void setup(){ |
This file contains 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
var inputs = document.getElementsByTagName('input'); | |
for(var i=0; i < inputs.length; i++) { | |
if(inputs[i].type == 'checkbox') { | |
if(inputs[i].disabled == false){inputs[i].click()}; | |
} | |
} |
OlderNewer