Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
A jam submission

Robo Defense | TweetTweetJam 8View game page

Charge your robo's battery!
Submitted by Camicus27 — 3 days, 14 hours before the deadline
Add to collection

Play game

Robo Defense | TweetTweetJam 8's itch.io page

How many characters of code did you use?
498

Include your code here, if you'd like to show it off!
using UnityEngine;
class A:MonoBehaviour
{
public Transform[] s;
public UnityEngine.UI.Text a,b;
float c,p,k=5,x=.1f;
int i,j;
void FixedUpdate()
{
s[0].position+=new Vector3(0,Input.GetAxis("V"))*x;
a.text=c.ToString("0.0");
if((k-=x)<0){k=6;i++;s[i%9+9].position=s[i%9+1].position;}
for(j=9;j<18;j++)s[j].position+=(s[0].position-s[j].position).normalized*x/4;
}
void OnTriggerStay2D(Collider2D o)
{
if(o.tag=="e"&&--c>0)o.transform.position*=99;
if(o.tag=="b"&&c-x>=0){p+=x;b.text=p.ToString("0");c-=x;}
if(o.tag=="c")c+=x;
}
}

Leave a comment

Log in with itch.io to leave a comment.

Comments

No one has posted a comment yet