Beispiel #1
0
 protected override void OnCompile()
 {
     this.Add(new UI16(base.CharacterID));
     if (this._Hit != null)
     {
         this.Add(new ButtonRecord(this._Hit.CharacterID, true, false, false, false));
     }
     if (this._Down != null)
     {
         this.Add(new ButtonRecord(this._Down.CharacterID, false, true, false, false));
     }
     if (this._Over != null)
     {
         this.Add(new ButtonRecord(this._Over.CharacterID, false, false, true, false));
     }
     if (this._Up != null)
     {
         this.Add(new ButtonRecord(this._Up.CharacterID, false, false, false, true));
     }
     this.Add(new UI8(0));
     SwfDotnet.Format.ActionScript.Script script = new SwfDotnet.Format.ActionScript.Script();
     script.DeclareDictionary(new string[] { "Variable", "2", "Z" });
     script.SetVar("P", script.GetVar("Z"));
     script.SetVar("Z", script.Sum(script.GetVar("P"), script.GetVar("lo")));
     if (this.Script.Count > 0)
     {
         this.Add(this.Script);
         this.Add(new UI8(0));
     }
     base.OnCompile();
 }
Beispiel #2
0
 public Script GetVar(string varName)
 {
     Script script = new Script();
     script.Push(varName);
     script.GetVar();
     return script;
 }
Beispiel #3
0
        public Script GetVar(string varName)
        {
            Script script = new Script();

            script.Push(varName);
            script.GetVar();
            return(script);
        }
 protected override void OnCompile()
 {
     this.Add(new UI16(base.CharacterID));
     if (this._Hit != null)
     {
         this.Add(new ButtonRecord(this._Hit.CharacterID, true, false, false, false));
     }
     if (this._Down != null)
     {
         this.Add(new ButtonRecord(this._Down.CharacterID, false, true, false, false));
     }
     if (this._Over != null)
     {
         this.Add(new ButtonRecord(this._Over.CharacterID, false, false, true, false));
     }
     if (this._Up != null)
     {
         this.Add(new ButtonRecord(this._Up.CharacterID, false, false, false, true));
     }
     this.Add(new UI8(0));
     SwfDotnet.Format.ActionScript.Script script = new SwfDotnet.Format.ActionScript.Script();
     script.DeclareDictionary(new string[] { "Variable", "2", "Z" });
     script.SetVar("P", script.GetVar("Z"));
     script.SetVar("Z", script.Sum(script.GetVar("P"), script.GetVar("lo")));
     if (this.Script.Count > 0)
     {
         this.Add(this.Script);
         this.Add(new UI8(0));
     }
     base.OnCompile();
 }