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
// Problem Statment: Allow the player to modify camera orientation during runtime using key press | |
// Since Framing Transposer Virtual Camera Target Mode by default does not allow altering camera rotation | |
// This script works as solution | |
// After dropping the script into your project, add it to virtual camera through Virtual Camera Extention field | |
// in the Virtual Camera Gameobject | |
using UnityEngine; | |
using Cinemachine; | |
//using TryAgainFSM; |
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
// Problem Statement: When using Framing Transposer to follow a target via virtual camera | |
// framing transposer does not allow altering rotation of the camera. | |
// this script let us set a initial rotation of the camera and then allow us to manipulate vcam orientation during runtime | |
// no Aim target gameObject is necessary. | |
// After dropping the script into your project, add it to virtual camera through Virtual Camera Extention field | |
// in the Virtual Camera Gameobject | |
using UnityEngine; | |
using Cinemachine; |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class Monster { | |
public: | |
int health; | |
int level; | |
char type; |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class Monster { | |
public: | |
int health; | |
int level; | |
char type; |
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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
class myIncreasingFunctor { | |
int increaseBy; | |
public: | |
myIncreasingFunctor(int _value) { | |
increaseBy = _value; |
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
#include <iostream> | |
using namespace std; | |
class myIncreasingFunctor { | |
int increaseBy; | |
public: | |
myIncreasingFunctor(int _value) { | |
increaseBy = _value; |
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
#include <iostream> | |
using namespace std; | |
// Solution #1 (BAD) | |
int IncreaseHealthBy50(int _hp) | |
{ | |
return _hp + 100; | |
} | |
int IncreaseHealthBy60(int _hp) |
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
#include <iostream> | |
using namespace std; | |
int IncreaseHealthBy50(int _hp) | |
{ | |
return _hp + 100; | |
} | |
int main() |
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
#include <iostream> | |
#include <doubly_linked_list.h> | |
// constructor | |
template <typename T> | |
DoublyLinkedList<T>::DoublyLinkedList () { | |
this->head = nullptr; | |
this->tail = nullptr; | |
this->length = 0; | |
} |
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
#ifndef DOUBLY_LINKED_LIST_H_ | |
#define DOUBLY_LINKED_LIST_H | |
/* Disclaimair: This is my first doubly linked list implementation. | |
** It is a bit rushed but I did my best to implement all the CRUD operations. | |
** Some of my functions are broken only in the sense that they do not perform checks for valid index value | |
** if the user provides wrong index value for node to be deleted, the function might break. (I had limited time, Sorry!) | |
** I urge you to improve my code and submit a pull request on GitHub! | |
*/ | |
// a generic node class for aur doubly linked list |
NewerOlder