コード例 #1
0
        public void addTask(EcsEntity task)
        {
            TaskJobComponent?job     = task.get <TaskJobComponent>();
            string           jobName = job.HasValue ? job.Value.job : "none";

            openTasks[jobName].Add(task);
        }
コード例 #2
0
 public new ActionTargetStatusEnum check(EcsEntity performer)
 {
     if (performer.get <UnitEquipmentComponent>()?.hauledItem == entity)
     {
         return(ActionTargetStatusEnum.READY); // item is in hands already
     }
     return(base.check(performer));
 }
コード例 #3
0
        private string getUnitName(EcsEntity unit)
        {
            NameComponent?name = unit.get <NameComponent>();

            return(name.HasValue ? name.Value.name : "no name");
        }