public PlayerAvatarAction(PlayerIDFlag playerID, AvatarActionType type, AvatarAction action) { PlayerID = playerID; ActionType = type; Action = action; Target = null; }
public PlayerAvatarAction(PlayerIDFlag playerID, AvatarActionType type, AvatarAction action, GameObject target) { PlayerID = playerID; ActionType = type; Action = action; Target = target; }
public static void LinkTypes() { if (gActionTypes.Count == 0) { List <string> avatarActionTypeNames = new List <string>(); avatarActionTypeNames.AddRange(Enum.GetNames(typeof(AvatarActionType))); List <string> avatarActionNames = new List <string>(); avatarActionNames.AddRange(Enum.GetNames(typeof(AvatarAction))); foreach (string avatarActionName in avatarActionNames) { foreach (string avatarActionTypeName in avatarActionTypeNames) { if (avatarActionName.Contains(avatarActionTypeName)) { AvatarAction action = (AvatarAction)Enum.Parse(typeof(AvatarAction), avatarActionName); AvatarActionType actionType = (AvatarActionType)Enum.Parse(typeof(AvatarActionType), avatarActionTypeName); gActionTypes.Add(action, actionType); ////Debug.Log ("paired " + avatarActionName + " with " + avatarActionTypeName); break; } } } } }