mirror of
https://git.muiegratis.online/suikoakari/Campofinale
synced 2025-12-22 22:44:37 +01:00
Aggiungere i file di progetto.
This commit is contained in:
67
Campofinale/Game/Spaceship/SpaceshipChar.cs
Normal file
67
Campofinale/Game/Spaceship/SpaceshipChar.cs
Normal file
@@ -0,0 +1,67 @@
|
||||
using MongoDB.Bson.Serialization.Attributes;
|
||||
using MongoDB.Bson;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static Campofinale.Resource.ResourceManager;
|
||||
using MongoDB.Bson.Serialization.IdGenerators;
|
||||
using Campofinale.Resource;
|
||||
|
||||
namespace Campofinale.Game.Spaceship
|
||||
{
|
||||
public class SpaceshipChar
|
||||
{
|
||||
[BsonId(IdGenerator = typeof(ObjectIdGenerator))]
|
||||
public ObjectId _id { get; set; }
|
||||
public string id;
|
||||
public ulong guid;
|
||||
public ulong owner;
|
||||
public string stationedRoomId = "";
|
||||
public float physicalStrength;
|
||||
public int favorability;
|
||||
public bool isWorking;
|
||||
public SpaceshipChar()
|
||||
{
|
||||
|
||||
}
|
||||
public SpaceshipChar(ulong owner, string id)
|
||||
{
|
||||
this.owner = owner;
|
||||
this.id = id;
|
||||
this.guid = (ulong)new Random().NextInt64();
|
||||
|
||||
}
|
||||
public string GetNpcId()
|
||||
{
|
||||
return ResourceManager.spaceShipCharBehaviourTable[id].npcId;
|
||||
}
|
||||
public ScdSpaceshipChar ToSpaceshipChar()
|
||||
{
|
||||
return new ScdSpaceshipChar()
|
||||
{
|
||||
CharId = id,
|
||||
Favorability = favorability,
|
||||
IsWorking = isWorking,
|
||||
PhysicalStrength = physicalStrength,
|
||||
StationedRoomId = stationedRoomId,
|
||||
Skills =
|
||||
{
|
||||
new ScdSpaceshipCharSkill()
|
||||
{
|
||||
Index=1,
|
||||
SkillId="spaceship_skill_acc_charmaterial_produce2_1"
|
||||
},
|
||||
new ScdSpaceshipCharSkill()
|
||||
{
|
||||
Index=0,
|
||||
SkillId="spaceship_skill_acc_all_ps_recovery1_2"
|
||||
}
|
||||
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user