Beispiel #1
0
 public static void NewInstance()
 {
     _countTimesNew += 1;
     timersInstance  = new Timers();
     stageInstance   = new Stage();//严格顺序必须比GRoot先实例化
     grootInstance   = new GRoot();
 }
Beispiel #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();
    }
Beispiel #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);
     }
 }
Beispiel #4
0
 protected FRoot()
 {
     InitWithObj(GRoot.inst);
     _root = GRoot.inst;
 }
Beispiel #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;
    }