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; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| //Feedback: Better variable names for parameters, overloading should only take one parameter(this), Use classes, | |
| //11/28/16 | |
| //C# write a function that takes in a knife object and Player object. Write a free function that returns true if the knife is backstabbing the player. |
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; | |
| using System.Collections.Generic; | |
| //This interface needs to be cut and pasted into a different file before running program | |
| interface IStates | |
| { | |
| Enum sName { get; set; } | |
| Delegate dDel { get; set; } | |
| bool Handler(); | |
| } |
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; | |
| public class DrawHalfCircle : MonoBehaviour { | |
| // Use this for initialization | |
| void Start () | |
| { | |
| List<GameObject> halfverts = new List<GameObject>(); |
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
| #include<iostream> | |
| //Question: Weapon DPS | |
| //We expect this question to take approximately 30 - 45 minutes. | |
| //Write a function that calculates the damage per second of a given weapon. | |
| //Requirements : Function must take a parameter of type that inherits from Weapon. | |
| //Return value must be to the nearest second decimal place.Ex : 35.6 | |
| //Weapon class | |
| class Weapon |
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
| //09/26/16 | |
| //Question 1: Distance from a Rectangle | |
| //We expect this question to take approximately 20 - 40 minutes. | |
| //Write a function that tests if a point falls within a specified distance(“dist”) of any part of a solid, 2D rectangle.The rectangle is specified by the bottom left corner, a width, and a height. | |
| //A function prototype and data structures you can assume exist are supplied below.You may make additions to the structures if you deem it appropriate.If you answer in a different language, you should follow a similar format : | |
| #include<iostream> | |
| struct Point | |
| { | |
| float x; | |
| float y; |
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
| Gist 13: answer the following questions and submit via gist by 930. | |
| 1. What is the difference between a directional and point light | |
| 2. Which lighting model have you implemented? | |
| 3. What are the equations for your model? | |
| 4. Explain in detail how a diffuse calculation is made. | |
| 5. Explain in detail how information goes from an application to the shader pipeline. | |
| //Answers |
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
| #include <iostream> | |
| unsigned int multiply(unsigned int num1, unsigned int num2) | |
| { | |
| unsigned int answer = 0; | |
| //As long as i is not equal to 0 | |
| for (int i = num2; i != 0; i--) | |
| {//Add the passed in first parameter to the current answer variable |
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
| 09/14/16 Morning gist | |
| In your own words answer this very simple question | |
| "How do you draw?" | |
| You have 2 hrs and you can use your own code as reference | |
| And notes | |
| This is an assessable question after 4 weeks of graphics | |
| //Without looking at code// | |
| 1.Create the objects and indices of what to draw and how to draw | |
| 2.Download proper libraries and then link appropriately |
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
| #include<iostream> | |
| #include<vector> | |
| //09/13/16 | |
| //Write a function that takes arguments to create a half circle. | |
| //Parameters should be radius, number of points and the return value should be the half circle | |
| struct Vertex | |
| { | |
| float X; |
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
| //09/12/16 | |
| //Write a function that takes another Func as a parameter. | |
| //The passed function need only to add two numbers. | |
| //Can the passed function be overloaded ? Explain why / why not | |
| //YES! The passed in function can be overloaded as long as the return type stays the same. | |
| //The parameters are of no importance to the function pointer. What matters is the return type. | |
| #include<iostream> |
NewerOlder