-
Notifications
You must be signed in to change notification settings - Fork 0
/
API.cs
29 lines (26 loc) · 822 Bytes
/
API.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using Terraria;
namespace Lives {
public static partial class LivesAPI {
public static bool AddLives( Player player, int lives ) {
var myplayer = player.GetModPlayer<LivesPlayer>();
return myplayer.AddLives( lives );
}
public static int GetLives( Player player ) {
var myplayer = player.GetModPlayer<LivesPlayer>();
return myplayer.Lives;
}
public static int GetDeaths( Player player ) {
var myplayer = player.GetModPlayer<LivesPlayer>();
return myplayer.Deaths;
}
public static byte GetOriginalDifficulty( Player player ) {
var myplayer = player.GetModPlayer<LivesPlayer>();
return myplayer.OriginalDifficulty;
}
public static bool IsImmortal( Player player ) {
var myplayer = player.GetModPlayer<LivesPlayer>();
return myplayer.IsImmortal;
}
}
}