You've already forked taptap2024_GJ_chidouren
updat core
This commit is contained in:
@@ -1,27 +1,31 @@
|
||||
using System.Collections.Generic;
|
||||
using Game.Component.SceneProp;
|
||||
using Sirenix.OdinInspector;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Serialization;
|
||||
|
||||
namespace Game.Component
|
||||
{
|
||||
public class ScenePart : MonoBehaviour
|
||||
{
|
||||
public TextAsset mapCacheData;
|
||||
public PolygonCollider2D cameraCollider;
|
||||
public Transform createPos;
|
||||
|
||||
public int completeConditionNumber = 10;
|
||||
public float playerBaseSpeed = 4f;
|
||||
|
||||
[FormerlySerializedAs ("completeProp")] public SuccessProp successProp;
|
||||
|
||||
[LabelText ("当前完成数:")] private int _currentConditionNumber = 0;
|
||||
|
||||
public int CurrentConditionNumber => this._currentConditionNumber;
|
||||
|
||||
private List<EnemyEntity> _enemyEntities;
|
||||
private List<BaseProp> _baseProps;
|
||||
|
||||
public float CurProgress => this._currentConditionNumber * 1f / completeConditionNumber;
|
||||
|
||||
public bool IsComplete => _currentConditionNumber >= completeConditionNumber;
|
||||
public bool IsCondition => _currentConditionNumber >= completeConditionNumber;
|
||||
|
||||
public bool AddConditionNumber (int number = 1)
|
||||
{
|
||||
@@ -36,12 +40,18 @@ namespace Game.Component
|
||||
{
|
||||
enemyEntity.ResetState ();
|
||||
}
|
||||
foreach (var baseProp in this._baseProps)
|
||||
{
|
||||
baseProp.ResetProp ();
|
||||
}
|
||||
this.successProp.gameObject.SetActive (false);
|
||||
}
|
||||
|
||||
public void InitPart ()
|
||||
{
|
||||
this._enemyEntities = new List<EnemyEntity> ();
|
||||
this._enemyEntities = new List<EnemyEntity> (transform.GetComponentsInChildren<EnemyEntity> (true));
|
||||
this._baseProps = new List<BaseProp> (transform.GetComponentsInChildren<BaseProp> (true));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user