2025-05-18 01:04:31 +08:00

83 lines
1.7 KiB
C#

// ***********************************************************************
// Assembly : Game
// Author : Kimch
// Created : 2020-09-02
// Description :
// Last Modified By :
// Last Modified On :
// ***********************************************************************
// <copyright file= "SpiritSword" company="Kimch"></copyright>
// <summary></summary>
// ***********************************************************************
namespace G
{
using UnityEngine;
/// <summary>
/// 幽灵剑
/// </summary>
public class SpiritSword : MonoBehaviour
{
public Transform sword;
protected Transform _transform;
protected Collider _collider;
protected Transform _cha1;
protected Transform _oldTarget;
protected int _swordIndex;
protected float _startDelay;
protected int _createIndex;
protected bool _createFinish;
protected bool _homing = true;
protected float _power;
protected float _liftTime;
protected int _swordCount;
protected int _hitCount;
protected int _hitCountMax;
public float lifeTime
{
set { _liftTime = value; }
}
public int swordCount
{
get { return _swordCount; }
set { _swordCount = value; }
}
public int maxHitCount
{
set { _hitCountMax = value; }
}
public float power
{
set { _power = value; }
}
private void Awake()
{
_transform = this.transform;
_collider = this.GetComponent<Collider>();
_cha1 = GameObject.FindWithTag("Player").transform;
}
public void Reset()
{
_collider.enabled = false;
_startDelay = 0f;
_createIndex = 0;
_swordIndex = 0;
_createFinish = false;
_homing = false;
_hitCount = 0;
}
}
}