Esempio n. 1
0
 private Task MakeMonster(MonsterInfo data, IRoomGrain room)
 {
     var monsterGrain = GrainFactory.GetGrain<IMonsterGrain>(data.Id);
     monsterGrain.SetInfo(data);
     monsterGrain.SetRoomGrain(room);
     return Task.FromResult(true);
 }
Esempio n. 2
0
 private async Task MakeMonster(MonsterInfo data, IRoomGrain room)
 {
     var monsterGrain = GrainClient.GrainFactory.GetGrain<IMonsterGrain>(data.Id);
     await monsterGrain.SetInfo(data);
     await monsterGrain.SetRoomGrain(room);
 }
Esempio n. 3
0
 Task IRoomGrain.Exit(MonsterInfo monster)
 {
     monsters.RemoveAll(x => x.Id == monster.Id);
     return TaskDone.Done;
 }
Esempio n. 4
0
 Task IRoomGrain.Enter(MonsterInfo monster)
 {
     monsters.RemoveAll(x => x.Id == monster.Id);
     monsters.Add(monster);
     return TaskDone.Done;
 }
Esempio n. 5
0
 Task IMonsterGrain.SetInfo(MonsterInfo info)
 {
     this.monsterInfo = info;
     return TaskDone.Done;
 }