Exemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        santaScript = santa.GetComponent <SimplePlatformController>();

        santaRb2d = santa.GetComponent <Rigidbody2D>();
        StartCoroutine("EnterBuilding");
    }
Exemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     audioSource       = GetComponent <AudioSource> ();
     playerScript      = GameObject.FindGameObjectWithTag("Player").GetComponent <SimplePlatformController>();
     temporaryPlatform = GameObject.Find("TemporaryPlatform");
     currentState      = gameState.titleState;
     StartCoroutine("Blinking");
 }
Exemplo n.º 3
0
    // Use this for initialization
    void Start()
    {
        GameObject simplePlatformControllerObject = GameObject.FindWithTag("Player");

        if (simplePlatformControllerObject != null)
        {
            simplePlatformController = simplePlatformControllerObject.GetComponent <SimplePlatformController>();
        }
    }
Exemplo n.º 4
0
 // Use this for initialization
 void Start()
 {
     quitButton = quitButton.GetComponent<Button> ();
     retryButton = retryButton.GetComponent<Button> ();
     bgMusicForOff = bgMusicForOff.gameObject.GetComponent<AudioSource>();
     bgMusicForOff.enabled = false;
     GameObject controllerObject = GameObject.FindWithTag("Player");
     controller = controllerObject.GetComponent<SimplePlatformController> ();
 }
    IEnumerator Timer()
    {
        GameObject player = GameObject.Find("hero");
        SimplePlatformController playerScript = player.GetComponent <SimplePlatformController>();

        playerScript.maxSpeed = 40f;
        yield return(new WaitForSeconds(8));

        playerScript.maxSpeed = 10f;
    }
Exemplo n.º 6
0
    // Use this for initialization
    void Start()
    {
        santaScript          = santa.GetComponent <SimplePlatformController>();
        santaRb2d            = santa.GetComponent <Rigidbody2D>();
        santaAnim            = santa.GetComponent <Animator>();
        floorNumber          = 0;
        floorNumberText.text = floorNumber.ToString();

        StartCoroutine("GetToFloor");
    }
Exemplo n.º 7
0
    IEnumerator Timer()
    {
        Debug.Log("Hei");
        GameObject player = GameObject.Find("hero");
        SimplePlatformController playerScript = player.GetComponent <SimplePlatformController>();

        playerScript.jumpForce = 2000.0f;
        yield return(new WaitForSeconds(6));

        playerScript.jumpForce = 1000.0f;
    }
Exemplo n.º 8
0
 /*void restart()
 {
     if (controller.hearts > 0)
         Application.LoadLevel(1);
 }*/
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.CompareTag("Player"))
     {
         AudioSource audio = GetComponent<AudioSource>();
         audio.Play();
         GameObject controllerObject = GameObject.FindWithTag("Player");
         controller = controllerObject.GetComponent<SimplePlatformController> ();
         if (controller.hearts > 0)
             controller.transform.position = controller.initialPosition;
         controller.rb2d.velocity = new Vector2 (0, 0);
         controller.blind = false;
         controller.blindText.SetActive(false);
         controller.blanketActive = false;
         controller.blanket.SetActive(false);
         controller.loseHeart();
     }
 }
Exemplo n.º 9
0
    void Start()
    {
        GameObject gameControllerObject = GameObject.FindWithTag("Player");

        simplePlatformController = gameControllerObject.GetComponent <SimplePlatformController>();
    }
Exemplo n.º 10
0
 // Use this for initialization
 void Start()
 {
     jumpSound  = GetComponent <AudioSource>();
     controller = GetComponent <SimplePlatformController>();
 }
Exemplo n.º 11
0
 private void Start()
 {
     hero = FindObjectOfType <SimplePlatformController>();
 }
Exemplo n.º 12
0
 // Use this for initialization
 void Start()
 {
     thePlayer    = FindObjectOfType <SimplePlatformController> ();
     count        = 0;
     winText.text = " ";
 }
Exemplo n.º 13
0
 void Awake()
 {
     spc  = GetComponent <SimplePlatformController>();
     rb2d = GetComponent <Rigidbody2D>();
     anim = GetComponent <Animator>();
 }
	// Use this for initialization
	void Start () {
		player = FindObjectOfType<SimplePlatformController> ();
	}
Exemplo n.º 15
0
 // Use this for initialization
 void Start()
 {
     GameObject controllerObject = GameObject.FindWithTag("Player");
     controller = controllerObject.GetComponent<SimplePlatformController>();
     rb2d = GetComponent<Rigidbody2D>();
 }
Exemplo n.º 16
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.Find("miney_17").GetComponent <SimplePlatformController>();
 }
Exemplo n.º 17
0
 // Use this for initialization
 void Start()
 {
     hero        = FindObjectOfType <SimplePlatformController>();
     can.enabled = false;
     count       = 0;
 }