33 lines
723 B
C#
33 lines
723 B
C#
using DG.Tweening;
|
|
using Mirror;
|
|
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class AtkBuff : NetworkBehaviour
|
|
{
|
|
public Collider box;
|
|
|
|
public GameObject txt;
|
|
public void ColliderAtkBuff()
|
|
{
|
|
box.enabled = false;
|
|
|
|
transform.gameObject.SetActive(false);
|
|
NetworkServer.Destroy(transform.gameObject);
|
|
}
|
|
|
|
public void Start()
|
|
{
|
|
if (isServer)
|
|
{
|
|
transform.DORotate(new Vector3(0f, 360f, 0f), 5f, RotateMode.LocalAxisAdd).SetLoops(-1, LoopType.Restart);
|
|
}
|
|
}
|
|
|
|
private void Update()
|
|
{
|
|
txt.transform.parent.GetComponent<Transform>().LookAt(GameInit.Ins.MRCamera.transform);
|
|
}
|
|
}
|