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 PlayerMovement : MonoBehaviour | |
{ | |
public float turnSpeed = 20f; | |
Animator m_Animator; | |
Vector3 m_Movement; | |
Rigidbody m_Rigidbody; |
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 PlayerMovement : MonoBehaviour | |
{ | |
public float speed; | |
private Rigidbody rb; | |
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 UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
public class PlayerController : MonoBehaviour { | |
public float speed; | |
private Rigidbody rb; | |
void 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
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.AI; | |
public class PlayerMovement : MonoBehaviour | |
{ | |
public Camera cam; | |
public NavMeshAgent player; |
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; | |
using UnityEngine.AI; | |
public class EnemyMovement : MonoBehaviour | |
{ | |
public NavMeshAgent enemy; | |
public GameObject player; | |
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 LINKEDLIST_H_ | |
#define LINKEDLIST_H_ | |
template <typename T> | |
class Node | |
{ | |
public: | |
Node<T>* next; | |
T data; | |
}; |
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 <linked_list.h> | |
// constructor -initialize the head = tail = null and length of the list = 0 | |
template <typename T> | |
LinkedList<T>::LinkedList () { | |
this->m_head = NULL; | |
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
#include <iostream> | |
#include <linked_list.h> | |
// constructor -initialize the head = tail = null and length of the list = 0 | |
template <typename T> | |
LinkedList<T>::LinkedList () { | |
this->m_head = NULL; | |
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
#include <iostream> | |
#include<linked_list.h> | |
using namespace std; | |
int main() | |
{ | |
LinkedList<int> myList; | |
for(int i = 0 ; i < 10 ; i++) | |
{ |
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> | |
using namespace std; | |
int main() | |
{ | |
// a whole lot of testing using the implemented function | |
// it is better to comment everything here and uncomment it line by line |
OlderNewer