示例#1
0
 public void OnClick()
 {
     foreach (Transform child in canvas.transform)
     {
         if (child.name == "HenseiPanel" && child.gameObject.activeSelf)
         {
             hensei = child.GetComponent <Hensei>();
             hensei.player.SetActive(true);
         }
     }
 }
示例#2
0
 // Use this for initialization
 void Start()
 {
     handgunMesh    = handgun.GetComponent <Anima2D.SpriteMeshInstance>();
     handgunAniMesh = handgun.GetComponent <Anima2D.SpriteMeshAnimation>().frames;
     rifleMesh      = rifle.GetComponent <Anima2D.SpriteMeshInstance>();
     rifleAniMesh   = rifle.GetComponent <Anima2D.SpriteMeshAnimation>().frames;
     syousaiPanel   = transform.root.Find("syousaiPanel");
     image          = syousaiPanel.transform.Find("Image");
     imageN         = image.GetComponent <Image>();
     bunrui         = syousaiPanel.transform.Find("Bunrui");
     bunruiText     = bunrui.GetComponent <Text>();
     henseiPanel    = transform.root.Find("HenseiPanel");
     hensei         = henseiPanel.GetComponent <Hensei>();
     //Debug.Log(handgunAniMesh[0]);
     //Debug.Log(rifleMesh);
     for (int i = 0; i < 5; i++)
     {
         playerItem[i] = Resources.Load <Anima2D.SpriteMesh>("SpriteMesh/PlayerItem/buki sozai" + (i + 1).ToString());
         //Debug.Log(playerItem[i]);
     }
 }
示例#3
0
        // General procedure: Remove all but flag, then run and replace each iteration.
        public void run(int run_times)
        {
            Console.WriteLine("LIST OF ALL SHIPS IN FLEET THAT WILL BE SPARKLED: " + string.Join(",", this.ship_list_array));
            string context = Hensei.CHANGE;
            string param   = Hensei.RemoveAll(this.fleet_id);

            this.kcp.proxy(context, param);

            for (int i = 0; i < this.ship_list_array.Length; i++)
            {
                if (this.ship_list_array[i] <= 0)
                {
                    continue;
                }

                runForOneShip(this.ship_list_array[i], run_times);

                if (i == this.ship_list_array.Length - 1)
                {
                    Console.WriteLine("FLEET SPARKLING DONE!");
                    break;
                }
                param = Hensei.Change(this.ship_list_array[i + 1], 1, this.fleet_id);
                this.kcp.proxy(context, param);
                Thread.Sleep(ONE_SECOND * 2);
                Console.WriteLine("\n\nNEXT SHIP.");
            }

            Console.WriteLine("Rebuilding fleet...");
            for (int j = 0; j < this.ship_list_array.Length; j++)
            {
                param = Hensei.Change(this.ship_list_array[j], j + 1, this.fleet_id);
                Thread.Sleep(ONE_SECOND);
                this.kcp.proxy(context, param);
            }

            Console.WriteLine("ALL JOBS COMPLETED");
        }
示例#4
0
 // Use this for initialization
 void Start()
 {
     //button = this.gameObject.GetComponent<Button>();
     hen    = transform.parent;
     hensei = hen.GetComponent <Hensei>();
 }
示例#5
0
 // Use this for initialization
 void Start()
 {
     hen    = transform.parent;
     hensei = hen.GetComponent <Hensei>();
 }