"U3d" Bucket landlord

Source: Internet
Author: User

Design Person: Liu Ying

qq:799391984

Email:[email protected]

Tel: 15301331993

Because the time is too short, the workmanship is still to be improved

Game run Start "Start Game"

650) this.width=650; "title=" main interface. png "style=" Float:none; "alt=" wkiom1ua59pxnzjgaaaip6-qsky257.jpg "src=" http:/ S3.51cto.com/wyfs02/m01/5b/2b/wkiom1ua59pxnzjgaaaip6-qsky257.jpg "/>

Start the game "Countdown card"

650) this.width=650; "title=" game begins. png "style=" Float:none; "alt=" wkiol1ua6ufz-igiaaebfqngwrk128.jpg "src=" http:/ S3.51cto.com/wyfs02/m01/5b/25/wkiol1ua6ufz-igiaaebfqngwrk128.jpg "/>

Click on "Cards"

650) this.width=650; "title=" Game card. png "style=" Float:none; "alt=" wkiol1ua6bparftpaaeeyonnnjm938.jpg "src="/http S3.51cto.com/wyfs02/m00/5b/25/wkiol1ua6bparftpaaeeyonnnjm938.jpg "/>

Design interface

650) this.width=650; "title=" engine. png "alt=" wkiol1ua6ivjilztaabke1wcrcs073.jpg "src=" http://s3.51cto.com/wyfs02/M02/ 5b/25/wkiol1ua6ivjilztaabke1wcrcs073.jpg "/>

<summary>
Operating Card
</summary>
private void Getpuke ()
{
i++;//the order control variable of the card
int k = Random.range (0, Globe.pukeList.Count);//random number 0-54
#region data in a split list
String value = Globe.pukelist[k]. ToString ();//Take out the card data
string[] str = value. Split (', ');//Split
String Pukepaizhi = str[2];//Remove Card value
String pukehuase = str[0];//out the suit
String pukevalues = str[1];//out of points
#endregion
Globe.pukeList.RemoveAt (k);//Remove data
if (Globe.pukeList.Count = = 3)//Cancel Call
{
Cancelinvoke ("Getpuke");
}
Gameobject pukes = (gameobject) Instantiate (Resources.load ("puke"));//Clone cards
Pukes. AddComponent ("Pukemovercontroller");//Add Script
Pukes. Getcomponent<pukemovercontroller> (). _value = Pukevalues;
Pukes. Getcomponent<pukemovercontroller> (). _type = Pukehuase;

#region Depth, Color control
Forclass (Pukepaizhi, Pukehuase, pukes);//Change the color
for (int d = 0; d < pukes.transform.childCount; d++)//loop control depth
{
Pukes.transform.GetChild (d). Getcomponent<uisprite> (). depth = i + 1;//Sub-object depth +1
}

if (i% 3 = = 1 | | I% 3 = = 2)//Determine the location of the build card
{
Pukes. Getcomponent<uisprite> (). Spritename = "hlddz_maingame0_2x_197";//change to Dark card
Pukes. Getcomponent<uibutton> (). Normalsprite = "hlddz_maingame0_2x_197";//change to Dark card
Pukes. Getcomponent<uisprite> (). depth = i + 2;//depth greater than sub-object depth
Pukes. Getcomponent<boxcollider> (). Enabled = FALSE;
Pukes. Getcomponent<uibutton> (). Enabled = FALSE;
}
Else
{
Pukes. Getcomponent<uisprite> (). depth = i;//depth is I

}
#endregion

#region Licensing Location
if (i% 3 = = 0)
{
_pukepos1.x-= 30;//position increment
Pukes.transform.parent = _pukepanel1;//converted to _PUKEPOS1 sub-object
Pukes.transform.localPosition = new Vector3 (-_pukepos1.x, _pukepos1.y, _pukepos1.z),//pukes's own coordinate change
Pukes.transform.localScale = new Vector3 (1, 1, 1),//pukes's own size reverts to 1
Pukes. Getcomponent<uisprite> (). depth = i;//Change the depth of the clone card
}
else if (i% 3 = = 1)
{
_pukepos2.x + = 6;//position increment
_pukepos2.y + = 6;//position increment
Pukes.transform.parent = _pukepanel2;//converted to _pukepos2 sub-object
Pukes.transform.localPosition = new Vector3 (-_pukepos2.x,-_pukepos2.y, _pukepos2.z),//pukes's own coordinate change
Pukes.transform.Rotate (0, 0,-45);//Swivel 45°
Pukes.transform.localScale = new Vector3 (1, 1, 1),//pukes's own size reverts to 1
}
else if (i% 3 = = 2)
{
_pukepos3.x-= 6;//position decreasing
_pukepos3.y + = 6;//position increment
Pukes.transform.parent = _pukepanel3;//converted to _PUKEPOS3 sub-object
Pukes.transform.localPosition = new Vector3 (-_pukepos3.x,-_pukepos3.y, _pukepos3.z),//pukes's own coordinate change
Pukes.transform.Rotate (0, 0, 45);//Swivel 45°
Pukes.transform.localScale = new Vector3 (1, 1, 1),//pukes's own size reverts to 1
}
#endregion

if (i==51)
{
Calldizhu ();
}
}

<summary>
Choose the man who robbed the landlord
</summary>
<param name= "_id" ></param>
public void Selectpeople (string _id)
{
for (int j = 0; J < Transform.childcount; J + +)
{
if (transform. Getchild (j). Getcomponent<peoplecontroller> (). ID==_ID)
{
Timer start
Transform. Getchild (j). Find ("Clock"). Gameobject.setactive (True);
Timer status
Transform. Getchild (j). Find ("Clock"). Getcomponent<stopwatchcontroller> (). Stopwatchstate = true;

Start timer
Transform. Getchild (j). Find ("Clock"). Getcomponent<stopwatchcontroller> (). Open ();

Rob the landlord to decide the behavior
Startcoroutine (transform. Getchild (j). Getcomponent<peoplecontroller> (). Jueding ());
}
}
}

"U3d" Bucket landlord

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.