50 lines
1.3 KiB
C#
50 lines
1.3 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using Valheim;
|
|
|
|
public class ObjPet : CommonObj
|
|
{
|
|
public ObjTypes ObjTypes = ObjTypes.pet;
|
|
[Header("等级")]
|
|
public int lvl = 1;
|
|
[Header("宠物类型")]
|
|
public PetType type;
|
|
[Header("宠物状态")]
|
|
public PetState state;
|
|
[Header("是否随机")]
|
|
public bool isRogu = false;
|
|
[Header("所属笼子id")]
|
|
public int cageId = -1;
|
|
|
|
public int mapId;
|
|
|
|
public override EditObjInfo PreparData()
|
|
{
|
|
EditObjInfo info = new EditObjInfo();
|
|
|
|
info.ObjType = (int)ObjTypes;
|
|
info.isObs = isObs;
|
|
info.isOcc = isOcc;
|
|
info.x = transform.position.x;
|
|
info.y = transform.position.y;
|
|
info.z = transform.position.z;
|
|
info.angleX = transform.eulerAngles.x;
|
|
info.angleY = transform.eulerAngles.y;
|
|
info.angleZ = transform.eulerAngles.z;
|
|
info.scaleX = transform.localScale.x;
|
|
info.scaleY = transform.localScale.y;
|
|
info.scaleZ = transform.localScale.z;
|
|
info.opacity = opacity;
|
|
|
|
info.id = (int)type;
|
|
info.lvl = lvl;
|
|
info.state = (int)state;
|
|
info.isRogu = isRogu;
|
|
info.cageId = cageId;
|
|
|
|
info.mapId = mapId;
|
|
return info;
|
|
}
|
|
}
|