3D tower defense game implementation (end) 5.3 Game Information UI (Feekood language), uifeekood

Source: Internet
Author: User

3D tower defense game implementation (end) 5.3 Game Information UI (Feekood language), uifeekood

(Feekood language introduction and study)
Http://www.wooyoogame.com/doc/index (learning)
Http://www.wooyoogame.com (home)
Http://www.feekood.com/(Development page)

----------
!
This is the last article in the 3D tower defense game series. Displays game information.
Money, wave number, remaining monsters, and time tips.
Source code link: http://pan.baidu.com/s/1c0D6BKk password: pod5

New script "TopButtonPanel. ais ":

TopButtonPrompt = // message {Type: "Button"; Text: ""; Time: 0; X: 0; Y: 30; Width: 100%; Height: 30; FontBrush: "# FFAFE5FA"; IsLeftToRight: false; show:-> {case (owner. show, {owner. time = 0; owner. time <:{ 2000, }<:{ owner. show = false ;};};};}; TopButtonBg = // Beijing {Type: "Button"; Text: ""; X: 0; Y: 0; width: 450; Height: 30; BackgroundBrush: "# ffffffff"; IsLeftToRight: false; BorderRadius: {0, 0, 10}; Border Brush: "# ffffffff"; BorderThickness: {,}; show: false ;}; TopButtonFraction = // monetary surplus {Type: "Button"; Text: "$: 30 "; X: 300; Y: 0; Width: 100; Height: 25; HAlign:" left "; BackgroundBrush:" # ffAFE5FA "; IsLeftToRight: false; BorderRadius: {,}; BorderBrush: "# ff020200"; BorderThickness: {,}; show: false ;}; TopButtonCheckpoint = // The level prompt {Type: "Button "; text: "level: 1"; X: 150; Y: 0; Width: 100; Height: 25; H Align: "left"; BackgroundBrush: "# ffAFE5FA"; IsLeftToRight: false; BorderRadius: {,}; BorderBrush: "# ff020200"; BorderThickness }; show: false ;}; TopButtonSurplus =// {Type: "Button"; Text: "remaining: 20"; X: 0; Y: 0; Width: 100; height: 25; HAlign: "left"; BackgroundBrush: "# ffAFE5FA"; IsLeftToRight: false; BorderRadius: {,}; BorderBrush: "# ff020200"; BorderThickness: {1, 1, 1}; show: false ;}; TopButtonSurplusTime = // the next wave of time prompts {Type: "Button"; Text: "Countdown: 20 S"; X: 0; Y: 40; Width: 125; Height: 25; HAlign: "left"; FontBrush: "# FFAFE5FA"; IsLeftToRight: false; show: false; Time: 20; Time:-> {owner. text = "Countdown:" + text (int (owner. time * 100)/100) + "S" ;}; ShowTime: false; ShowTime :=>{ owner. show = true; owner. time = 20; owner. time <: {0, 20000} <::{ owner. show = false };};}; // Create a UIcreate (TopButtonSurplusTime); Create (Top ButtonBg); Create (TopButtonFraction); Create (TopButtonSurplus); create (TopButtonCheckpoint); create (TopButtonPrompt); TopButtonPanel ={// management panel show: false; show: -> {// hide TopButtonBg. show = owner. show; TopButtonFraction. show = owner. show; TopButtonCheckpoint. show = owner. show; TopButtonSurplus. show = owner. show ;}; Fraction: 30; // monetary Fraction:-> {TopButtonFraction. text = "$:" + text (owner. fraction) ;}; Checkpoint: 1; // Checkpoint:-> {TopButtonCheckpoint. text = "level:" + text (owner. checkpoint) ;}; Surplus: 20; // remaining monster Surplus:-> {TopButtonSurplus. text = "remaining:" + text (owner. surplus); case (owner. surplus = 0, {GameButtonCtl. text = "Start again"; TopButtonSurplusTime. time <: "clear"; TopButtonSurplusTime. show = false; GameButtonCtl. show = true; FoePanel. foeCheckpoint = 1; FoePanel. refurbishTab = false; foreach (FoePanel. foeAssemble, {G Etdata (value ). clearOneself = true;}); FoePanel. foeAssemble ={}; TopButtonSurplus. text = "remaining:" + text (20); owner. checkpoint = 1; owner. fraction = 30; owner. surplus = 20;}) ;}; Prompt: ""; // The Prompt "Prompt:-> {case (owner. prompt! = "", {TopButtonPrompt. text = owner. Prompt; TopButtonPrompt. show = true ;}); owner. Prompt = "" ;};}; TopButtonPanel. show = true;

The above is the information UI, but you need to change the data at the corresponding location.
FoeMoveBase. ais

FoePanel. ais

TurretPanel. ais

Of course, the Main. ais script also needs to introduce this UI.

Include ("3D map/MainMap. ais "); // introduce the 3D map module Include (" Turret/TurretPanel. ais "); // introduce the turret module Include (" OtherTower/TransmissionTower. ais "); // introduce monsters Include (" OtherTower/LifeTower. ais "); // introduce the intermediate Life tower Include (" Foe/FoePanel. ais "); // introduces the monster refresh Panel Include (" TopButtonPanel. ais "); // introduce prompt information

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.