public void UpdateActor(ClassificationQuestion question, List <Sprite> sprites) { id = question.ActorIds [index]; type = (ActorTypes)(question.ActorIds [index] - 1); // question.Actors [id]-1 because actor ids start from 1..10 title = type.ToString(); sRenderer.sprite = sprites [question.ActorIds [index] - 1] as Sprite; }
public static ActorEntry CreateActorItem(ActorTypes type, string name) { ActorEntry item = new ActorEntry(); item.ActorTypeID = (int)type; item.ActorTypeName = type.ToString(); item.EntityName = name; item.EntityHash = FNV64.Hash(item.EntityName); return(item); }