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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class playerScript : MonoBehaviour | |
{ | |
public float speed = 20F; | |
Rigidbody rigidbody; | |
// Start is called before the first frame update |
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
Mensch mensch1 = new Mensch(12, "Juri", "Schüler"); | |
Mensch mensch2 = new Mensch(25, "Carla", "Studentin"); | |
mensch1.meinJob(); | |
mensch2.meinJob(); | |
} // End of 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
lebensEnergie = 11; | |
Debug.Log("Die Figur hat noch: " + lebensEnergie + " Lebensenergie."); | |
Debug.Log(myString); | |
Debug.Log("Das Ergebnis ist: " + addition(15, lebensEnergie)); | |
//Arithmetische Operatoren | |
int a = 8; | |
int b = 3; | |
int c; |
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
const empty = document.querySelectorAll(".empty"); | |
const drag = document.querySelector(".drag"); | |
drag.addEventListener("dragstart", dragStart); | |
drag.addEventListener("dragend", dragEnd); | |
// requestAnimationFrame - подменяет стиль на прозрачный. работает с частотой 60fps | |
function dragStart(event) { | |
console.log("start"); | |
this.style.backgroundColor = "green"; |
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
/** | |
* Mouse Functions. | |
* | |
* Click on the box and drag it across the screen. | |
*/ | |
float bx; | |
float by; | |
int boxSize = 75; | |
boolean overBox = false; |
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 System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
class DragTransform : MonoBehaviour | |
{ | |
private Color mouseOverColor = Color.blue; | |
private Color originalColor = Color.yellow; | |
private bool dragging = false; |