Skip to content
Snippets Groups Projects
Commit 2a64c353 authored by N2970's avatar N2970
Browse files

added more enemies to the game

parent 2e98b2c9
No related branches found
No related tags found
No related merge requests found
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1107 &-7971600974860877870
AnimatorStateMachine:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Base Layer
m_ChildStates:
- serializedVersion: 1
m_State: {fileID: 1454453763812855977}
m_Position: {x: 346, y: 139, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 1454453763812855977}
--- !u!91 &9100000
AnimatorController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Ghost
serializedVersion: 5
m_AnimatorParameters: []
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
m_StateMachine: {fileID: -7971600974860877870}
m_Mask: {fileID: 0}
m_Motions: []
m_Behaviours: []
m_BlendingMode: 0
m_SyncedLayerIndex: -1
m_DefaultWeight: 0
m_IKPass: 0
m_SyncedLayerAffectsTiming: 0
m_Controller: {fileID: 9100000}
--- !u!1102 &1454453763812855977
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Ghost_Walk
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: 7400000, guid: 2017cad317b564c409a9e5bd02341461, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
fileFormatVersion: 2
guid: c405ff928dd7b2541b077bc95cc303d3
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:
......@@ -150,63 +150,78 @@ SkinnedMeshRenderer:
m_Center: {x: 0.47926563, y: 0.99965894, z: 0.50778025}
m_Extent: {x: 1.3090248, y: 0.9985337, z: 1.1511977}
m_DirtyAABB: 0
--- !u!1 &7254608850056601872
GameObject:
--- !u!1001 &7678884342048052810
PrefabInstance:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5038478422818583599}
- component: {fileID: 3518912616932395146}
- component: {fileID: 2883899346223202574}
m_Layer: 0
m_Name: PointOfView
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5038478422818583599
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1463475805446061115}
m_Modifications:
- target: {fileID: 1026095930233993050, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_Name
value: PointOfView
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalPosition.y
value: 1.4
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalPosition.z
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalRotation.w
value: 0.9848078
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalRotation.x
value: 0.17364816
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 20
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: f66c73be824c09d4fbfb4bfd76b75b65, type: 3}
--- !u!4 &5038478422818583599 stripped
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_CorrespondingSourceObject: {fileID: 3421792275150611045, guid: f66c73be824c09d4fbfb4bfd76b75b65,
type: 3}
m_PrefabInstance: {fileID: 7678884342048052810}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7254608850056601872}
m_LocalRotation: {x: 0.17364816, y: 0, z: 0, w: 0.9848078}
m_LocalPosition: {x: 0, y: 1.4, z: 0.4}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 1463475805446061115}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 20, y: 0, z: 0}
--- !u!136 &3518912616932395146
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7254608850056601872}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
m_Radius: 0.7
m_Height: 2
m_Direction: 2
m_Center: {x: 0, y: 0, z: 0.95}
--- !u!114 &2883899346223202574
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7254608850056601872}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9e4a994da5ae698479e08d95c0cc194b, type: 3}
m_Name:
m_EditorClassIdentifier:
player: {fileID: 0}
gameEnding: {fileID: 0}
This diff is collapsed.
fileFormatVersion: 2
guid: e3cfebcc1e1251946b4a6b2f91007e17
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &1026095930233993050
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3421792275150611045}
- component: {fileID: 6504694290419031744}
- component: {fileID: 4797824209743566660}
m_Layer: 0
m_Name: PointOfView
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3421792275150611045
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1026095930233993050}
m_LocalRotation: {x: 0.17364816, y: 0, z: 0, w: 0.9848078}
m_LocalPosition: {x: 0, y: 1.4, z: 0.4}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 20, y: 0, z: 0}
--- !u!136 &6504694290419031744
CapsuleCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1026095930233993050}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
m_Radius: 0.7
m_Height: 2
m_Direction: 2
m_Center: {x: 0, y: 0, z: 0.95}
--- !u!114 &4797824209743566660
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1026095930233993050}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9e4a994da5ae698479e08d95c0cc194b, type: 3}
m_Name:
m_EditorClassIdentifier:
player: {fileID: 0}
gameEnding: {fileID: 0}
fileFormatVersion: 2
guid: f66c73be824c09d4fbfb4bfd76b75b65
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
This diff is collapsed.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class WaypointPatrol : MonoBehaviour
{
public NavMeshAgent navMeshAgent;
public Transform[] waypoints;
int m_CurrentWaypointIndex;
// Start is called before the first frame update
void Start()
{
navMeshAgent.SetDestination(waypoints[0].position);
}
// Update is called once per frame
void Update()
{
if (navMeshAgent.remainingDistance < navMeshAgent.stoppingDistance)
{
m_CurrentWaypointIndex = (m_CurrentWaypointIndex + 1) % waypoints.Length;
navMeshAgent.SetDestination(waypoints[m_CurrentWaypointIndex].position);
}
}
}
fileFormatVersion: 2
guid: e344ad369c87081449163de9ca67a8df
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment