예제 #1
0
        public PlayerResources(Actor self, PlayerResourcesInfo info)
        {
            Info  = info;
            owner = self.Owner;

            var startingCash = self.World.LobbyInfo.GlobalSettings
                               .OptionOrDefault("startingcash", info.DefaultCash.ToString());

            if (!int.TryParse(startingCash, out Cash))
            {
                Cash = info.DefaultCash;
            }
        }
예제 #2
0
        public PlayerResources(Actor self, PlayerResourcesInfo info)
        {
            Info  = info;
            owner = self.Owner;

            var startingCash = self.World.LobbyInfo.GlobalSettings
                               .OptionOrDefault("startingcash", info.DefaultCash.ToString());

            if (!int.TryParse(startingCash, out Cash))
            {
                Cash = info.DefaultCash;
            }

            lastNotificationTime = -Info.InsufficientFundsNotificationInterval;
        }