Friday, April 28, 2017

Finished Destroy By Contact Script for Space Shooter

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DestroyByContact : MonoBehaviour
{
    public GameObject explosion;
    public GameObject playerExplosion;
    public int scoreValue;
    private GameController gameController;

    void Start()
    {
        GameObject gameControllerObject = GameObject.FindWithTag ("GameController");
            if (gameControllerObject != null)
         {
            gameController = gameControllerObject.GetComponent ();
        }   
        if (gameController == null)
        {
            Debug.Log ("Cannot Find    'GameController' script");

        }
        }


    void OnTriggerEnter(Collider other) {
        if (other.CompareTag ("Boundary") || other.CompareTag ("Enemy"))

        {   
            return;
        }

        if (explosion != null)
        {
            Instantiate (explosion, transform.position, transform.rotation);
        }
        if (other.tag == "Player")
        {
            Instantiate (playerExplosion, other.transform.position, other.transform.rotation);
            gameController.GameOver ();
        }
        gameController.AddScore (scoreValue);
        Destroy(other.gameObject);
        Destroy (gameObject);
    }
       

Monday, April 24, 2017

Forced Perspective Photography

Thursday in Photo 1:

Forced Perspective Examples:

Creative Examples:
http://www.zdwired.com/creative-ideas-of-forced-perspective-photography-technique/

Read these tips on shooting Forced Perspective photography:
http://www.thephotoargus.com/5-tips-for-creating-excellent-forced-perspective-photographs/

Use the entire period to 
shoot Forced Perspective shots around the campus. Have fun. Be creative. Work in groups of two or three if necessary.
Turn in a ten picture contact sheet at the end of the period.

Tuesday you will do the same away from school.





Thursday, April 13, 2017

Game Controller Script (pre-enemies)

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;

public class GameController : MonoBehaviour {

    public GameObject[] hazards;
    public Vector3 spawnValues;
    public int hazardCount;
    public float spawnWait;
    public float startWait; 
    public float waveWait;

    public GUIText scoreText;
    public GUIText restartText;
    public GUIText gameOverText;

    private bool gameOver;
    private bool restart;
    private int score;


    void Start ()
    {
        gameOver = false;
        restart = false;
        restartText.text = "";
        gameOverText.text = "";
        score = 0;
        UpdateScore ();
        StartCoroutine (SpawnWaves ());
    }
        
    void Update ()
    {
        if (restart)
        {
            if (Input.GetKeyDown (KeyCode.R)) 
            {
                SceneManager.LoadScene (SceneManager.GetActiveScene ().buildIndex);
            }
        }
    }

    IEnumerator SpawnWaves ()
    {
        yield return new WaitForSeconds (startWait);
        while (true)
        {
        for (int i = 0;i < hazardCount;i++) 
            {
                GameObject hazard = hazards [Random.Range (0, hazards.Length)];
                Vector3 spawnPosition = new Vector3 (Random.Range (-spawnValues.x, spawnValues.x), spawnValues.y, spawnValues.z);
                Quaternion spawnRotation = Quaternion.identity;
                Instantiate (hazard, spawnPosition, spawnRotation);
                yield return new WaitForSeconds (spawnWait);
            }
            yield return new WaitForSeconds (waveWait);

            if (gameOver) {
                restartText.text = "Press 'R' To Restart";
                restart = true;
                break;
            }
        }
    }
    public void AddScore (int newScoreValue)
    {
        score += newScoreValue;
        UpdateScore ();
    }

    void UpdateScore ()
    {
        scoreText.text = "Score: " + score;
    }

    public void GameOver ()
    {
        gameOverText.text = "Game Over!";
        gameOver = true;
    }

}  

Tuesday, April 11, 2017

Spring Quote Assignment

Spring Quote Assignment

Photo 2: Spring Quote Assignment

 



Spring Quote Asisgnment

http://decideforyourself.files.wordpress.com/2008/10/spring2.jpg

"In the spring, at the end of the day, you should smell like dirt." 
-- Margaret Atwood

Spring is nature's way of saying, "Let's party!" ~Robin Williams

In the spring I have counted one hundred and thirty-six different kinds of weather inside of four and twenty hours. ~Mark Twain

I sing of brooks, of blossoms, birds, and bowers: Of April, May, of June, and July flowers. I sing of Maypoles, Hock-carts, wassails, wakes, Of bridegrooms, brides, and of their bridal cakes. 
Robert Herrick

You will shoot two contact sheets based around two quotes about the spring season. In other words, pick your quotes and shoot pictures for those quotes.
I will list a few websites where you can find some quotes about spring, or you can find your own.

  • First, pick your two quotes.
You will have an in class shooting day on Thursday.
You will shoot pictures over spring break.
Contact sheets are due at the end of each of these days.
 After break you will have class time to adjust these pictures.

Many spring quotes are directly about the seasons and nature. However, you will find many quotes that also deal with events or sports that take place during spring time like weddings, music festivals, baseball, and golf etc. You also may find quotes that talk about spring cleaning, BBQ's, family gatherings, Easter, and Mother's Day etc.

Spring Quotes






You may also use a quote from spring poems.

Don't forget, you can also try to find your own quotations as well.

spring-3.jpg Happy Spring! image by sonmade44