30 lines
621 B
C#
30 lines
621 B
C#
![]() |
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class Item : MonoBehaviour
|
||
|
{
|
||
|
protected Transform oriTrans;
|
||
|
|
||
|
virtual protected void Start() {
|
||
|
|
||
|
transform.SetParent(null);
|
||
|
oriTrans=transform;
|
||
|
|
||
|
}
|
||
|
|
||
|
virtual public void ReturnToOri() {
|
||
|
transform.SetParent(null);
|
||
|
transform.position = oriTrans.position;
|
||
|
}
|
||
|
virtual public void InPosition(Transform tragetTrans) {
|
||
|
transform.SetParent(transform);
|
||
|
transform.localPosition = Vector3.zero;
|
||
|
}
|
||
|
|
||
|
protected virtual void Attack() {
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|