コード例 #1
0
 public void SetEntity(CharacterEntity entity)
 {
     this.entity = entity;
     GetNode <CharacterIcon>("Body/Left/CharacterIcon").SetCharacter(entity);
     actions = entity.AllowedActions();
     if (actions.Contains(VillageAction.QUEST))
     {
         actions.Remove(VillageAction.QUEST);
     }
     popup.Clear();
     foreach (VillageAction action in actions)
     {
         popup.AddItem(VillageActionExtensions.ActionText(action, entity.ageGroup).Item1.ToString(), id: (int)action);
     }
 }
コード例 #2
0
ファイル: VillageAction.cs プロジェクト: Swynfel/heirloom
 public static bool Idle(this CharacterEntity entity)
 {
     return(entity.Action() == VillageAction.REST && entity.AllowedActions().Count > 1);
 }