ajout seeker script + seeker particle effect

This commit is contained in:
karakune 2016-06-26 10:36:34 -04:00
parent 806f112556
commit 2c70709305
3 changed files with 74 additions and 0 deletions

Binary file not shown.

View 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;
//}
}
}

View File

@ -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