当前位置: 首页>>代码示例>>C#>>正文


C# Achievement类代码示例

本文整理汇总了C#中Achievement的典型用法代码示例。如果您正苦于以下问题:C# Achievement类的具体用法?C# Achievement怎么用?C# Achievement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Achievement类属于命名空间,在下文中一共展示了Achievement类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Start

	// Use this for initialization
	void Start () {
        this.inventory = new List<Item>();
        this.offered = new List<Item>();

        var manager = GameObject.Find("GameHandler").GetComponent<AchievementManager>();
        achHungryPanda = manager.GetAchievement("hungry_panda");
    }
开发者ID:Claypuppet,项目名称:pantree,代码行数:8,代码来源:MainPlayerScript.cs

示例2: UIAchievementListItem

		public UIAchievementListItem(Achievement achievement)
		{
			this.BackgroundColor = new Color(26, 40, 89) * 0.8f;
			this.BorderColor = new Color(13, 20, 44) * 0.8f;
			this._achievement = achievement;
			this.Height.Set(82f, 0f);
			this.Width.Set(0f, 1f);
			this.PaddingTop = 8f;
			this.PaddingLeft = 9f;
			int iconIndex = Main.Achievements.GetIconIndex(achievement.Name);
			this._iconIndex = iconIndex;
			this._iconFrameUnlocked = new Rectangle(iconIndex % 8 * 66, iconIndex / 8 * 66, 64, 64);
			this._iconFrameLocked = this._iconFrameUnlocked;
			this._iconFrameLocked.X = this._iconFrameLocked.X + 528;
			this._iconFrame = this._iconFrameLocked;
			this.UpdateIconFrame();
			this._achievementIcon = new UIImageFramed(TextureManager.Load("Images/UI/Achievements"), this._iconFrame);
			base.Append(this._achievementIcon);
			this._achievementIconBorders = new UIImage(TextureManager.Load("Images/UI/Achievement_Borders"));
			this._achievementIconBorders.Left.Set(-4f, 0f);
			this._achievementIconBorders.Top.Set(-4f, 0f);
			base.Append(this._achievementIconBorders);
			this._innerPanelTopTexture = TextureManager.Load("Images/UI/Achievement_InnerPanelTop");
			this._innerPanelBottomTexture = TextureManager.Load("Images/UI/Achievement_InnerPanelBottom");
			this._categoryTexture = TextureManager.Load("Images/UI/Achievement_Categories");
		}
开发者ID:thegamingboffin,项目名称:Ulterraria_Reborn_GitHub,代码行数:26,代码来源:UIAchievementListItem.cs

示例3: InvokeIfNotNull

 public static void InvokeIfNotNull(this AchievementUnlockedDelegate achievementUnlockedDelegate, Achievement achievement)
 {
     if (achievementUnlockedDelegate != null)
     {
         achievementUnlockedDelegate(achievement);
     }
 }
开发者ID:JaakkoLipsanen,项目名称:Flai.XNA,代码行数:7,代码来源:AchievementExtensions.cs

示例4: AchievementToast

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="achv">Associated achievement</param>
        /// <param name="duration">Duration to stay visible (ms)</param>
        /// <param name="position">Starting position</param>
        /// <param name="width"></param>
        /// <param name="height"></param>
        public AchievementToast(Achievement achv, int duration, Vector2 position, int width, int height)
        {
            title = achv.Name;
            description = achv.Description;
            age = 0;
            lifespan = duration;
            this.position = position;
            this.width = width;
            this.height = height;
            banner = SpriteDatabase.GetAnimation("achievement_banner").Texture;

            // Yellow particles spew out on the left and right in semi-circles away from the banner
            leftSpewer = new ParticleSpewer(
                position.X+53, position.Y + 52,
                10000, 30, MathHelper.ToRadians(90), MathHelper.ToRadians(270),
                0, 500, 2, 120, 60, 60, 0, 1, 1, 1, true, 0.5f);
            leftSpewer.Absolute = true;
            leftSpewer.Start();

            rightSpewer = new ParticleSpewer(
                position.X + width, position.Y + 52,
                10000, 30, MathHelper.ToRadians(-90), MathHelper.ToRadians(90),
                0, 500, 2, 120, 60, 60, 0, 1, 1, 1, true, 0.5f);
            rightSpewer.Absolute = true;
            rightSpewer.Start();
        }
开发者ID:iknowDavenMC,项目名称:SuperFlash,代码行数:34,代码来源:AchievementToast.cs

示例5: Achievement_t

 /// <summary>
 ///     Creates an Achievement. You must also mirror the data provided here in
 ///     https://partner.steamgames.com/apps/achievements/yourappid
 /// </summary>
 /// <param name="achievement">The "API Name Progress Stat" used to uniquely identify the achievement.</param>
 /// <param name="name">The "Display Name" that will be shown to players in game and on the Steam Community.</param>
 /// <param name="desc">The "Description" that will be shown to players in game and on the Steam Community.</param>
 public Achievement_t(Achievement achievementID, string name, string desc)
 {
     _eAchievementID = achievementID;
     m_strName = name;
     m_strDescription = desc;
     _bAchieved = false;
 }
开发者ID:soft319,项目名称:Borderless-Gaming,代码行数:14,代码来源:AchievementManager.cs

示例6: createAchievement2

 private static Achievement createAchievement2()
 {
     Achievement a = new Achievement();
     a.name = "Beatles and Rolling Stones";
     a.description = "Sing at least one beatles and at least one rolling stones song.";
     a.ID = 0;
     a.image = AchievementImage.Image1;
     a.statementsAnd = true;
     a.selectList = new AchievementSelect[2];
     AchievementSelect select = new AchievementSelect();
     select.startDate = DateTime.MinValue;
     select.endDate = DateTime.MaxValue;
     select.selectKeyword = SelectKeyword.CountGTE;
     select.selectValue = "1";
     select.clauseKeyword = ClauseKeyword.Artist;
     select.clauseValue = "Rolling Stones";
     a.selectList[0] = select;
     AchievementSelect select2 = new AchievementSelect();
     select2.startDate = DateTime.MinValue;
     select2.endDate = DateTime.MaxValue;
     select2.selectKeyword = SelectKeyword.CountGTE;
     select2.selectValue = "1";
     select2.clauseKeyword = ClauseKeyword.Artist;
     select2.clauseValue = "Beatles";
     a.selectList[1] = select2;
     a.isPermanant = false;
     a.visible = true;
     return a;
 }
开发者ID:jakub77,项目名称:KServer,代码行数:29,代码来源:Program.cs

示例7: AchievementSellScreen

 public AchievementSellScreen(Game game, Achievement achievement)
   : base(game)
 {
   this.achievement = achievement;
   this.UpdateOrder = -1;
   this.DrawOrder = 1002;
 }
开发者ID:tanis2000,项目名称:FEZ,代码行数:7,代码来源:AchievementSellScreen.cs

示例8: Frame

        public override void Frame(double frameTime)
        {
            base.Frame(frameTime);

            Achievement achv = m_guinan.GetCurrentAchievement();
            //send achievement if it's different than the last one or more than 5s have passed
            if (((achv != null && m_achievementStopwatch.IsRunning == false)
                ||(achv != null && m_achievementStopwatch.ElapsedMilliseconds > 5000))
                ||(achv != m_lastAchivement && achv != null))
            {
                m_achievementStopwatch.Reset();
                m_achievementStopwatch.Start();
                m_lastAchivement = achv;

                sendAchievement(achv);
            }

            //send player data if session is started and data hasnt been set yet
            if(m_statTracker.SessionStarted() && !m_playerdatasent)
            {
                RecursionTracker.StatTracker.SessionStats sessionStats = m_statTracker.GetSessionStats();
                Player player = m_statTracker.GetPlayer();
                m_playerdatasent = true;
                sendPlayerData(player, sessionStats);
            }
            //reset playerdata bool
            else if(!m_statTracker.SessionStarted() && m_playerdatasent)
            {
                m_playerdatasent = false;
            }
        }
开发者ID:ultimawep,项目名称:RTST-Web-Overlay,代码行数:31,代码来源:RTSTWebOverlay.cs

示例9: TestAchievement

		public void TestAchievement()
		{
			var achievement = new Achievement(Name, Description);
			Assert.AreEqual(Name, achievement.Name);
			Assert.AreEqual(Description, achievement.Description);
			Assert.IsFalse(achievement.IsAchieved);
		}
开发者ID:whztt07,项目名称:DeltaEngine,代码行数:7,代码来源:AchievementTests.cs

示例10: PlayerWithAchievement

 public PlayerWithAchievement(Player player, int levelOfAchievement, string toNextLevelLabel, Achievement achievement)
 {
     Player = player;
     LevelOfAchievement = levelOfAchievement;
     ToNextLevelLabel = toNextLevelLabel;
     Achievement = achievement;
 }
开发者ID:Cybercom-Poland,项目名称:Trambambule,代码行数:7,代码来源:PlayerWithLevelOfAchievement.cs

示例11: DrawableAchievement

 public DrawableAchievement(SceneManager sceneManager, Achievement achievement)
 {
     _title = achievement.Name;
     _description = achievement.Description;
     _imagePath = achievement.ImagePath;
     _isOwned = achievement.IsOwned;
     _sceneManager = sceneManager;
 }
开发者ID:ThomasCOLLIN,项目名称:devjv,代码行数:8,代码来源:DrawableAchievement.cs

示例12: ShowAchievement

        public static void ShowAchievement(Achievement a, string comm)
        {
            if (a == null) return;
            AchievementForm f = new AchievementForm();
            f.achievement = a;

            ShowNotification(f, comm);
        }
开发者ID:Mytherin,项目名称:Tibialyzer,代码行数:8,代码来源:NotificationManager.cs

示例13: AlreadyContainsAchievement

    public bool AlreadyContainsAchievement(Achievement.Categ type)
    {
        foreach (Achievement achiev in Achievements)
            if (achiev.categ.Equals(type))
                return true;

        return false;
    }
开发者ID:Vnepomuceno,项目名称:organix,代码行数:8,代码来源:Player.cs

示例14: Post

        public HttpResponseMessage Post(Achievement achievement)
        {
            var hubContext = GlobalHost.ConnectionManager.GetHubContext<Notify>();

            hubContext.Clients.NewAchievement(achievement.Message);

            return Request.CreateResponse(HttpStatusCode.OK);
        }
开发者ID:scmccart,项目名称:RxAchievementDemo,代码行数:8,代码来源:AchievementController.cs

示例15: UpdateInner

 protected override void UpdateInner(UpdateContext updateContext)
 {
     _achievementShowTimer.Update(updateContext);
     if (_currentAchievement != null && _achievementShowTimer.HasFinished)
     {
         _currentAchievement = null;
     }
 }
开发者ID:JaakkoLipsanen,项目名称:Skypiea,代码行数:8,代码来源:AchievementRenderer.cs


注:本文中的Achievement类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。