mirror of
https://github.com/ConjureETS/MeltedBananasOJam2016.git
synced 2026-03-24 02:21:06 +00:00
ajout seeker script + seeker particle effect
This commit is contained in:
parent
806f112556
commit
2c70709305
BIN
Assets/Prefabs/Seeker.prefab
Normal file
BIN
Assets/Prefabs/Seeker.prefab
Normal file
Binary file not shown.
35
Assets/Scripts/SeekerController.cs
Normal file
35
Assets/Scripts/SeekerController.cs
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
using UnityEngine;
|
||||||
|
using System.Collections;
|
||||||
|
|
||||||
|
public class SeekerController : MonoBehaviour {
|
||||||
|
|
||||||
|
bool isAggroed;
|
||||||
|
float step;
|
||||||
|
public float speed;
|
||||||
|
GameObject player;
|
||||||
|
NavMeshAgent agent;
|
||||||
|
|
||||||
|
// Use this for initialization
|
||||||
|
void Start () {
|
||||||
|
player = GameObject.Find("Player");
|
||||||
|
agent = GetComponent<NavMeshAgent>();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update () {
|
||||||
|
}
|
||||||
|
|
||||||
|
void OnTriggerEnter (Collider other)
|
||||||
|
{
|
||||||
|
if (other.tag == "Aggro")
|
||||||
|
{
|
||||||
|
//isAggroed = true;
|
||||||
|
agent.destination = player.transform.position;
|
||||||
|
}
|
||||||
|
//if (isAggroed == true)
|
||||||
|
//{
|
||||||
|
// agent.destination = player.transform.position;
|
||||||
|
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!21 &2100000
|
||||||
|
Material:
|
||||||
|
serializedVersion: 3
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_PrefabParentObject: {fileID: 0}
|
||||||
|
m_PrefabInternal: {fileID: 0}
|
||||||
|
m_Name: ParticleSmokeBlack
|
||||||
|
m_Shader: {fileID: 10723, guid: 0000000000000000f000000000000000, type: 0}
|
||||||
|
m_ShaderKeywords: []
|
||||||
|
m_CustomRenderQueue: -1
|
||||||
|
m_SavedProperties:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_TexEnvs:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _MainTex
|
||||||
|
second:
|
||||||
|
m_Texture: {fileID: 2800000, guid: 830884c18cf5e7a4895ee02c2dcd8e12, type: 3}
|
||||||
|
m_Scale: {x: 1, y: 1}
|
||||||
|
m_Offset: {x: 0, y: 0}
|
||||||
|
m_Floats:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _InvFade
|
||||||
|
second: .827499986
|
||||||
|
m_Colors:
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _Color
|
||||||
|
second: {r: 1, g: 1, b: 1, a: 1}
|
||||||
|
data:
|
||||||
|
first:
|
||||||
|
name: _TintColor
|
||||||
|
second: {r: .358208954, g: .358208954, b: .358208954, a: .75686276}
|
||||||
|
--- !u!1002 &2100001
|
||||||
|
EditorExtensionImpl:
|
||||||
|
serializedVersion: 6
|
||||||
Loading…
x
Reference in New Issue
Block a user