Jump to content

[Tutorial][Indepth] A better take on task based scripts


Vilius

Recommended Posts

Quote

 

 

8 hours ago, Promo said:

Sorry I am a total noob coder.
We have this code to add the task in this example:


@Override
public void onStart() {
    tasks.add(new Attack(this));

How do I add another task , for example Banking?
Can I put all name of task in an array list and pass that array list as argument to tasks.add( List here)(this)) ?

You make another class like the Attack one with your banking code in it :)
And then you can add it like the attack one 

tasks.add(new Banking(this));

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...