Commit eb948373 authored by 15박보승's avatar 15박보승 Committed by 18류지석

CrowdControl WIP

parent 8edc0a0e
......@@ -47,6 +47,8 @@ public abstract class Actor : MonoBehaviour
[SerializeField]
protected ParticleSystem hitParticle;
private List<CrowdControl> CCs = new List<CrowdControl>();
protected virtual void Start()
{
agent = GetComponent<NodalPathfinding2DAgent>();
......@@ -58,6 +60,15 @@ public abstract class Actor : MonoBehaviour
agent.MoveTo(destination);
}
public void AddNewCC(CrowdControl newCC)
{
CCs.Add(newCC);
}
public void RemoveCC(CrowdControl CC)
{
CCs.Remove(CC);
}
public abstract void OnSelected();
public abstract void OnUnselected();
}
fileFormatVersion: 2
guid: c286afae12977ff4b8428a48f983c8fd
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public abstract class CrowdControl
{
public Actor actor;
public float remainedTime;
public CrowdControl(Actor actor)
{
this.actor = actor;
remainedTime = 0;
}
public virtual void CCUpdate(float deltaTime)
{
remainedTime -= deltaTime;
if (remainedTime <= 0)
{
}
}
public abstract bool ApplyCC();
protected abstract bool UnapplyCC();
}
fileFormatVersion: 2
guid: 0a356b517b684ed4db0eeadf1bc5c7be
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment