Example #1
0
 public static void NewInstance()
 {
     _countTimesNew += 1;
     timersInstance  = new Timers();
     stageInstance   = new Stage();//严格顺序必须比GRoot先实例化
     grootInstance   = new GRoot();
 }
Example #2
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="target"></param>
    /// <param name="downward"></param>
    public void ShowPopup(GObject target, object downward)
    {
        GRoot r = target != null ? target.root : GRoot.inst;

        r.ShowPopup(this.contentPane, (target is GRoot) ? null : target, downward);
        // r.AddChild(this.contentPane);
        // r.AdjustModalLayer();
    }
Example #3
0
 public void CenterOn(GRoot r, bool restraint)
 {
     this.SetXY((int)((r.width - this.width) / 2), (int)((r.height - this.height) / 2));
     if (restraint)
     {
         this.AddRelation(r, RelationType.Center_Center);
         this.AddRelation(r, RelationType.Middle_Middle);
     }
 }
Example #4
0
File: FRoot.cs Project: cnscj/THSTG
 protected FRoot()
 {
     InitWithObj(GRoot.inst);
     _root = GRoot.inst;
 }
Example #5
0
    private void restoreSelfHp(GRoot heroDoc)
    {
        HeroData tempHeroData = heroDoc.data as HeroData;
        Hashtable tempNumber = SkillLib.instance.getSkillDefBySkillID("GROOT1").activeEffectTable;	//GROOT1
        float tempHp = ((Effect)tempNumber["hp"]).num;
        int tempSelfHp = (int)(heroDoc.realMaxHp * (tempHp / 100f));

        heroDoc.addHp(tempSelfHp);

        //		heroDoc.realHp = (tempSelfHp > heroDoc.realMaxHp) ? heroDoc.realMaxHp : tempSelfHp;
    }