2016-03-27 13:09:09 +08:00
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
2016-03-07 07:28:32 +08:00
|
|
|
|
using StardewValley;
|
|
|
|
|
|
|
|
|
|
namespace StardewModdingAPI.Entities
|
|
|
|
|
{
|
2016-03-27 13:09:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Static class for intergrating with the player
|
|
|
|
|
/// </summary>
|
|
|
|
|
public class SPlayer
|
2016-03-07 07:28:32 +08:00
|
|
|
|
{
|
2016-03-27 13:09:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Calls 'getAllFarmers' in Game1
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static List<Farmer> AllFarmers => Game1.getAllFarmers();
|
2016-03-07 07:28:32 +08:00
|
|
|
|
|
2016-03-27 13:09:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Do not use.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Obsolete("Use 'Player' instead.")]
|
|
|
|
|
public static Farmer CurrentFarmer => Game1.player;
|
2016-03-07 07:28:32 +08:00
|
|
|
|
|
2016-03-27 13:09:09 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the current player from Game1
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static Farmer Player => Game1.player;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets the player's current location from Game1
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static GameLocation CurrentFarmerLocation => Player.currentLocation;
|
2016-03-07 07:28:32 +08:00
|
|
|
|
}
|
2016-03-27 13:09:09 +08:00
|
|
|
|
}
|