42 lines
1.1 KiB
C#
42 lines
1.1 KiB
C#
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
namespace Gameplay.Level
|
||
|
{
|
||
|
public class Kong
|
||
|
{
|
||
|
public Thumbtack LevelThumbtack { get; set; }
|
||
|
|
||
|
public GameObject Obj { get; set; }
|
||
|
|
||
|
public int HoleIndex { get; set; }
|
||
|
|
||
|
public List<Plank> Planks { get; set; } = new List<Plank>();
|
||
|
|
||
|
private GameObject _gfxThumbtackUp;
|
||
|
|
||
|
private ParticleSystem _particleSystem;
|
||
|
|
||
|
public Kong(GameObject obj)
|
||
|
{
|
||
|
Obj = obj;
|
||
|
_gfxThumbtackUp = Obj.transform.Find("gfx_thumbtack_up").gameObject;
|
||
|
_particleSystem = _gfxThumbtackUp.GetComponent<ParticleSystem>();
|
||
|
}
|
||
|
|
||
|
public Kong(GameObject obj,int holeIndex)
|
||
|
{
|
||
|
Obj = obj;
|
||
|
HoleIndex = holeIndex;
|
||
|
_gfxThumbtackUp = Obj.transform.Find("gfx_thumbtack_up").gameObject;
|
||
|
_particleSystem = _gfxThumbtackUp.GetComponent<ParticleSystem>();
|
||
|
}
|
||
|
|
||
|
public void ShowGfx()
|
||
|
{
|
||
|
_gfxThumbtackUp.SetActive(true);
|
||
|
GfxManager.Instance.ShowGfxOnce(_particleSystem, _gfxThumbtackUp);
|
||
|
}
|
||
|
}
|
||
|
}
|