일꾼 테이블 추가
This commit is contained in:
parent
309cfb5339
commit
8c3b53eb45
File diff suppressed because one or more lines are too long
|
|
@ -0,0 +1 @@
|
|||
[{"n_WorkerID": "70001", "s_Prefab": "Goblin_Baby", "s_Icon": "icon_worker1", "f_Scale": "1", "f_UIScale": "1.5", "f_MoveSpeed": "3", "f_SeekTimeDelay": "1"}]
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 26b3a1f60d01d6540942a55cc4e532b2
|
||||
TextScriptImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Binary file not shown.
|
|
@ -21,6 +21,7 @@ GameObject:
|
|||
- component: {fileID: -7534003211835488954}
|
||||
- component: {fileID: -2830852699263530080}
|
||||
- component: {fileID: 414854830075295263}
|
||||
- component: {fileID: 341951742548278028}
|
||||
- component: {fileID: -3791081474655894813}
|
||||
- component: {fileID: 7551069147352652576}
|
||||
- component: {fileID: -1121496951404105699}
|
||||
|
|
@ -106,7 +107,6 @@ MonoBehaviour:
|
|||
m_Script: {fileID: 11500000, guid: fa0edc407a9bcde45903cb6ddfc8be7e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
go_Camera: {fileID: 0}
|
||||
--- !u!114 &4820350133457708190
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -256,6 +256,19 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_json: {fileID: 4900000, guid: 61b878e2858b1b5429f764a50349473d, type: 3}
|
||||
--- !u!114 &341951742548278028
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 5043163894663193716}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: dee939a966b448c49af613787c56cc6e, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_json: {fileID: 4900000, guid: 26b3a1f60d01d6540942a55cc4e532b2, type: 3}
|
||||
--- !u!114 &-3791081474655894813
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ using UnityEngine;
|
|||
|
||||
public class WorkerActor : Actor
|
||||
{
|
||||
EquipmentTableBase m_FairyTableData;
|
||||
WorkerListTableData m_WorkerListTableData;
|
||||
DropItem go_finditem;
|
||||
float SeekTime = 5f, t;
|
||||
Actor m_Owner;
|
||||
|
||||
byte Status = 0; // 0 아이들, 1 캐릭터 뒤로 이동 중, 2 아이템으로 이동 중
|
||||
|
||||
|
|
@ -19,23 +20,22 @@ public class WorkerActor : Actor
|
|||
public override void Set(bool isEnemy, Actor owner, ServerData sdata, int _id, bool _stop, bool _ui = false)
|
||||
{
|
||||
base.Set(isEnemy, owner, sdata, _id, _stop);
|
||||
m_Owner = owner;
|
||||
|
||||
m_FairyTableData = table_fairy.Ins.Get_Data(_id);
|
||||
m_WorkerListTableData = table_worker.Ins.Get_Data_orNull(_id);
|
||||
if (!_ui)
|
||||
{
|
||||
int lv = sdata.Get_SmeltingLv(_id);
|
||||
m_NavMeshAgent.speed = m_NavSpeed = 6f; // TODO 정인호 : 요정은 날개로 변경될 예정 m_FairyTableData.Get_StatValue(eStat.FairyMoveSpeed, lv);
|
||||
t = SeekTime = 2f; //m_FairyTableData.Get_StatValue(eStat.FairySeek, lv);
|
||||
int lv = 1; // TODO 정인호 : 일꾼 레벨
|
||||
m_NavMeshAgent.speed = m_NavSpeed = m_WorkerListTableData.f_MoveSpeed;
|
||||
t = SeekTime = m_WorkerListTableData.f_SeekTimeDelay;
|
||||
Set_Warp(Get_Pos());
|
||||
if (!m_NavMeshAgent.isOnNavMesh)
|
||||
Set_Warp(Get_Pos());
|
||||
Status = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Vector3 Get_Pos()
|
||||
{
|
||||
return DSUtil.Get_RandomPos_onNavMesh(MyValue.MyPC.Get_position(), 0f, 1f);
|
||||
return DSUtil.Get_RandomPos_onNavMesh(m_Owner.Get_position(), 0f, 1f);
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
|
|
@ -65,7 +65,7 @@ public class WorkerActor : Actor
|
|||
}
|
||||
}
|
||||
|
||||
if (Status == 0 && Vector3.Distance(MyValue.MyPC.Get_position(), Get_position()) > 3f)
|
||||
if (Status == 0 && Vector3.Distance(m_Owner.Get_position(), Get_position()) > 3f)
|
||||
{ // 캐릭터 근처로 옴
|
||||
Play_Run();
|
||||
Set_Path(Get_Pos());
|
||||
|
|
|
|||
|
|
@ -2077,7 +2077,7 @@ public partial class ServerData
|
|||
break;
|
||||
case eItem.Book:
|
||||
break;
|
||||
case eItem.Heart: case eItem.MobDropItem: case eItem.Max: break;
|
||||
case eItem.Max: break;
|
||||
case eItem.Potion:
|
||||
var potionkey = _id.ToString();
|
||||
if (Potion[potionkey][0] >= 1)
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
using CodeStage.AntiCheat.ObscuredTypes;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
[Serializable]
|
||||
public class WorkerListTableData : TableDataBase
|
||||
{
|
||||
protected ObscuredInt _WorkerID;
|
||||
public int n_WorkerID
|
||||
{
|
||||
get { return _WorkerID; }
|
||||
set { _WorkerID = value; _WorkerID.RandomizeCryptoKey(); }
|
||||
}
|
||||
|
||||
public string s_Prefab;
|
||||
public float f_Scale;
|
||||
public float f_UIScale;
|
||||
|
||||
protected ObscuredFloat _MoveSpeed;
|
||||
public float f_MoveSpeed
|
||||
{
|
||||
get { return _MoveSpeed; }
|
||||
set { _MoveSpeed = value; _MoveSpeed.RandomizeCryptoKey(); }
|
||||
}
|
||||
|
||||
protected ObscuredFloat _SeekTimeDelay;
|
||||
public float f_SeekTimeDelay
|
||||
{
|
||||
get { return _SeekTimeDelay; }
|
||||
set { _SeekTimeDelay = value; _SeekTimeDelay.RandomizeCryptoKey(); }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class table_worker : table_missionbase
|
||||
{
|
||||
public static table_worker Ins;
|
||||
List<WorkerListTableData> tableDatas;
|
||||
Dictionary<int, WorkerListTableData> dic_Data = new Dictionary<int, WorkerListTableData>();
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
Ins = this;
|
||||
}
|
||||
|
||||
protected override void Start()
|
||||
{
|
||||
tableDatas = JsonConvert.DeserializeObject<List<WorkerListTableData>>(json_last);
|
||||
for (int i = 0; i < Get_DataList().Count; i++)
|
||||
{
|
||||
var temp = Get_DataList()[i];
|
||||
dic_Data.Add(temp.n_WorkerID, temp);
|
||||
}
|
||||
|
||||
base.Start();
|
||||
}
|
||||
|
||||
public WorkerListTableData Get_Data_orNull(int id) { return dic_Data.ContainsKey(id) ? dic_Data[id] : null; }
|
||||
public List<WorkerListTableData> Get_DataList() { return tableDatas; }
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: dee939a966b448c49af613787c56cc6e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -258,9 +258,8 @@ public enum eItem
|
|||
AllGambleTicket, WeaponTicket, RingTicket, NeckTicket, BootsTicket, FairyTicket, MagicTicket, PetTicket,
|
||||
Exp,
|
||||
PC, PCCostume, Weapon, Armor, Helmet, Extra, Necklace, Ring,
|
||||
Fairy, WeaponCostume, Pet, Farmer, Book, Page, Food, Seed,
|
||||
Fairy, WeaponCostume, Pet, Worker, Farmer, Book, Page, Food, Seed,
|
||||
Title, Inven, Pass, Potion, Relic,
|
||||
Heart, MobDropItem,
|
||||
// 상점
|
||||
ShopPackage, ADRemove,
|
||||
IdontKnow, DailyInit,
|
||||
|
|
|
|||
Loading…
Reference in New Issue