From 9f1b453bd7db4f2c70a542361eb35e1bcf154e49 Mon Sep 17 00:00:00 2001 From: marco Date: Sun, 3 Oct 2021 14:12:22 -0600 Subject: [PATCH] Cleaned up runner code. --- .../{deathglitch => death1}/death10001.png | Bin .../{deathglitch => death1}/death10002.png | Bin .../{deathglitch => death1}/death10003.png | Bin .../{deathglitch => death1}/death10004.png | Bin .../{deathglitch => death1}/death10005.png | Bin .../{deathglitch => death1}/death10006.png | Bin .../{deathglitch => death1}/death10007.png | Bin .../{deathglitch => death1}/death10008.png | Bin .../{deathglitch => death1}/death10009.png | Bin .../{deathglitch => death1}/death10010.png | Bin .../{deathglitch => death1}/death10011.png | Bin .../{deathglitch => death1}/death10012.png | Bin .../{deathglitch => death1}/death10013.png | Bin .../{deathglitch => death1}/death10014.png | Bin .../{deathglitch => death1}/death10015.png | Bin .../{deathglitch => death1}/death10016.png | Bin .../{deathglitch => death1}/death10017.png | Bin .../{deathglitch => death1}/death10018.png | Bin .../{deathglitch => death1}/death10019.png | Bin .../{deathglitch => death1}/death10020.png | Bin .../{deathglitch => death1}/death10021.png | Bin .../{deathglitch => death1}/death10022.png | Bin .../{deathglitch => death1}/death10023.png | Bin .../{deathglitch => death1}/death10024.png | Bin .../{deathglitch => death1}/death10025.png | Bin .../{deathglitch => death1}/death10026.png | Bin .../{deathglitch => death1}/death10027.png | Bin .../{deathglitch => death1}/death10028.png | Bin .../{deathglitch => death1}/death10029.png | Bin .../{deathglitch => death1}/death10030.png | Bin .../{deathglitch => death1}/death10031.png | Bin .../{deathglitch => death1}/death10032.png | Bin .../{deathglitch => death1}/death10033.png | Bin .../{deathglitch => death1}/death10034.png | Bin .../{deathglitch => death1}/death10035.png | Bin .../{deathglitch => death1}/death10036.png | Bin .../{deathglitch => death1}/death10037.png | Bin .../{deathglitch => death1}/death10038.png | Bin .../{deathglitch => death1}/death10039.png | Bin .../{deathglitch => death1}/death10040.png | Bin .../{deathglitch => death1}/death10041.png | Bin .../{deathglitch => death1}/death10042.png | Bin .../{deathglitch => death1}/death10043.png | Bin .../{deathglitch => death1}/death10044.png | Bin .../{deathglitch => death1}/death10045.png | Bin .../{deathglitch => death1}/death10046.png | Bin .../{deathglitch => death1}/death10047.png | Bin .../{deathglitch => death1}/death10048.png | Bin .../{deathglitch => death1}/death10049.png | Bin .../{deathglitch => death1}/death10050.png | Bin .../{deathglitch => death1}/death10051.png | Bin .../{deathglitch => death1}/death10052.png | Bin .../{deathglitch => death1}/death10053.png | Bin .../{deathglitch => death1}/death10054.png | Bin .../{deathglitch => death1}/death10055.png | Bin .../{deathglitch => death1}/death10056.png | Bin .../{deathglitch => death1}/death10057.png | Bin .../{deathglitch => death1}/death10058.png | Bin .../{deathglitch => death1}/death10059.png | Bin .../{deathglitch => death1}/death10060.png | Bin .../{deathglitch => death1}/death10061.png | Bin .../{deathglitch => death1}/death10062.png | Bin .../{deathglitch => death1}/death10063.png | Bin .../{deathglitch => death1}/death10064.png | Bin .../{deathglitch => death1}/death10065.png | Bin .../{deathglitch => death1}/death10066.png | Bin .../{deathglitch => death1}/death10067.png | Bin .../{deathglitch => death1}/death10068.png | Bin .../{deathglitch => death1}/death10069.png | Bin .../{deathglitch => death1}/death10070.png | Bin .../{deathglitch => death1}/death10071.png | Bin .../{deathglitch => death1}/death10072.png | Bin .../{deathglitch => death1}/death10073.png | Bin .../{deathglitch => death1}/death10074.png | Bin .../{deathglitch => death1}/death10075.png | Bin .../{deathglitch => death1}/death10076.png | Bin .../{deathglitch => death1}/death10077.png | Bin .../{deathglitch => death1}/death10078.png | Bin .../{deathglitch => death1}/death10079.png | Bin .../{deathglitch => death1}/death10080.png | Bin .../{deathglitch => death1}/death10081.png | Bin .../runner/{death => death2}/death20001.png | Bin .../runner/{death => death2}/death20002.png | Bin .../runner/{death => death2}/death20003.png | Bin .../runner/{death => death2}/death20004.png | Bin .../runner/{death => death2}/death20005.png | Bin .../runner/{death => death2}/death20006.png | Bin .../runner/{death => death2}/death20007.png | Bin .../runner/{death => death2}/death20008.png | Bin .../runner/{death => death2}/death20009.png | Bin .../runner/{death => death2}/death20010.png | Bin .../runner/{death => death2}/death20011.png | Bin .../runner/{death => death2}/death20012.png | Bin .../runner/{death => death2}/death20013.png | Bin .../runner/{death => death2}/death20014.png | Bin .../runner/{death => death2}/death20015.png | Bin .../runner/{death => death2}/death20016.png | Bin .../runner/{death => death2}/death20017.png | Bin .../runner/{death => death2}/death20018.png | Bin .../runner/{death => death2}/death20019.png | Bin .../runner/{death => death2}/death20020.png | Bin .../runner/{death => death2}/death20021.png | Bin .../runner/{death => death2}/death20022.png | Bin .../runner/{death => death2}/death20023.png | Bin .../runner/{death => death2}/death20024.png | Bin .../runner/{death => death2}/death20025.png | Bin .../runner/{death => death2}/death20026.png | Bin .../runner/{death => death2}/death20027.png | Bin .../runner/{death => death2}/death20028.png | Bin .../runner/{death => death2}/death20029.png | Bin .../runner/{death => death2}/death20030.png | Bin .../runner/{death => death2}/death20031.png | Bin .../runner/{death => death2}/death20032.png | Bin .../runner/{death => death2}/death20033.png | Bin .../runner/{death => death2}/death20034.png | Bin .../runner/{death => death2}/death20035.png | Bin .../runner/{death => death2}/death20036.png | Bin .../runner/{death => death2}/death20037.png | Bin .../runner/{death => death2}/death20038.png | Bin .../runner/{death => death2}/death20039.png | Bin .../runner/{death => death2}/death20040.png | Bin .../runner/{death => death2}/death20041.png | Bin .../runner/{death => death2}/death20042.png | Bin .../runner/{death => death2}/death20043.png | Bin .../runner/{death => death2}/death20044.png | Bin .../runner/{death => death2}/death20045.png | Bin .../runner/{death => death2}/death20046.png | Bin .../runner/{death => death2}/death20047.png | Bin .../runner/{death => death2}/death20048.png | Bin .../runner/{death => death2}/death20049.png | Bin .../runner/{death => death2}/death20050.png | Bin .../runner/{death => death2}/death20051.png | Bin .../runner/{death => death2}/death20052.png | Bin .../runner/{death => death2}/death20053.png | Bin .../runner/{death => death2}/death20054.png | Bin .../runner/{death => death2}/death20055.png | Bin .../runner/{death => death2}/death20056.png | Bin .../runner/{death => death2}/death20057.png | Bin lib/main.dart | 4 +- lib/runner.dart | 224 ++++-------------- pubspec.yaml | 4 +- 141 files changed, 43 insertions(+), 189 deletions(-) rename assets/images/runner/{deathglitch => death1}/death10001.png (100%) rename assets/images/runner/{deathglitch => death1}/death10002.png (100%) rename assets/images/runner/{deathglitch => death1}/death10003.png (100%) rename assets/images/runner/{deathglitch => death1}/death10004.png (100%) rename assets/images/runner/{deathglitch => death1}/death10005.png (100%) rename assets/images/runner/{deathglitch => death1}/death10006.png (100%) rename assets/images/runner/{deathglitch => death1}/death10007.png (100%) rename assets/images/runner/{deathglitch => death1}/death10008.png (100%) rename assets/images/runner/{deathglitch => death1}/death10009.png (100%) rename assets/images/runner/{deathglitch => death1}/death10010.png (100%) rename assets/images/runner/{deathglitch => death1}/death10011.png (100%) rename assets/images/runner/{deathglitch => death1}/death10012.png (100%) rename assets/images/runner/{deathglitch => death1}/death10013.png (100%) rename assets/images/runner/{deathglitch => death1}/death10014.png (100%) rename assets/images/runner/{deathglitch => death1}/death10015.png (100%) rename assets/images/runner/{deathglitch => death1}/death10016.png (100%) rename assets/images/runner/{deathglitch => death1}/death10017.png (100%) rename assets/images/runner/{deathglitch => death1}/death10018.png (100%) rename assets/images/runner/{deathglitch => death1}/death10019.png (100%) rename assets/images/runner/{deathglitch => death1}/death10020.png (100%) rename assets/images/runner/{deathglitch => death1}/death10021.png (100%) rename assets/images/runner/{deathglitch => death1}/death10022.png (100%) rename assets/images/runner/{deathglitch => death1}/death10023.png (100%) rename assets/images/runner/{deathglitch => death1}/death10024.png (100%) rename assets/images/runner/{deathglitch => death1}/death10025.png (100%) rename assets/images/runner/{deathglitch => death1}/death10026.png (100%) rename assets/images/runner/{deathglitch => death1}/death10027.png (100%) rename assets/images/runner/{deathglitch => death1}/death10028.png (100%) rename assets/images/runner/{deathglitch => death1}/death10029.png (100%) rename assets/images/runner/{deathglitch => death1}/death10030.png (100%) rename assets/images/runner/{deathglitch => death1}/death10031.png (100%) rename assets/images/runner/{deathglitch => death1}/death10032.png (100%) rename assets/images/runner/{deathglitch => death1}/death10033.png (100%) rename assets/images/runner/{deathglitch => death1}/death10034.png (100%) rename assets/images/runner/{deathglitch => death1}/death10035.png (100%) rename assets/images/runner/{deathglitch => death1}/death10036.png (100%) rename assets/images/runner/{deathglitch => death1}/death10037.png (100%) rename assets/images/runner/{deathglitch => death1}/death10038.png (100%) rename assets/images/runner/{deathglitch => death1}/death10039.png (100%) rename assets/images/runner/{deathglitch => death1}/death10040.png (100%) rename assets/images/runner/{deathglitch => death1}/death10041.png (100%) rename assets/images/runner/{deathglitch => death1}/death10042.png (100%) rename assets/images/runner/{deathglitch => death1}/death10043.png (100%) rename assets/images/runner/{deathglitch => death1}/death10044.png (100%) rename assets/images/runner/{deathglitch => death1}/death10045.png (100%) rename assets/images/runner/{deathglitch => death1}/death10046.png (100%) rename assets/images/runner/{deathglitch => death1}/death10047.png (100%) rename assets/images/runner/{deathglitch => death1}/death10048.png (100%) rename assets/images/runner/{deathglitch => death1}/death10049.png (100%) rename assets/images/runner/{deathglitch => death1}/death10050.png (100%) rename assets/images/runner/{deathglitch => death1}/death10051.png (100%) rename assets/images/runner/{deathglitch => death1}/death10052.png (100%) rename assets/images/runner/{deathglitch => death1}/death10053.png (100%) rename assets/images/runner/{deathglitch => death1}/death10054.png (100%) rename assets/images/runner/{deathglitch => death1}/death10055.png (100%) rename assets/images/runner/{deathglitch => death1}/death10056.png (100%) rename assets/images/runner/{deathglitch => death1}/death10057.png (100%) rename assets/images/runner/{deathglitch => death1}/death10058.png (100%) rename assets/images/runner/{deathglitch => death1}/death10059.png (100%) rename assets/images/runner/{deathglitch => death1}/death10060.png (100%) rename assets/images/runner/{deathglitch => death1}/death10061.png (100%) rename assets/images/runner/{deathglitch => death1}/death10062.png (100%) rename assets/images/runner/{deathglitch => death1}/death10063.png (100%) rename assets/images/runner/{deathglitch => death1}/death10064.png (100%) rename assets/images/runner/{deathglitch => death1}/death10065.png (100%) rename assets/images/runner/{deathglitch => death1}/death10066.png (100%) rename assets/images/runner/{deathglitch => death1}/death10067.png (100%) rename assets/images/runner/{deathglitch => death1}/death10068.png (100%) rename assets/images/runner/{deathglitch => death1}/death10069.png (100%) rename assets/images/runner/{deathglitch => death1}/death10070.png (100%) rename assets/images/runner/{deathglitch => death1}/death10071.png (100%) rename assets/images/runner/{deathglitch => death1}/death10072.png (100%) rename assets/images/runner/{deathglitch => death1}/death10073.png (100%) rename assets/images/runner/{deathglitch => death1}/death10074.png (100%) rename assets/images/runner/{deathglitch => death1}/death10075.png (100%) rename assets/images/runner/{deathglitch => death1}/death10076.png (100%) rename assets/images/runner/{deathglitch => death1}/death10077.png (100%) rename assets/images/runner/{deathglitch => death1}/death10078.png (100%) rename assets/images/runner/{deathglitch => death1}/death10079.png (100%) rename assets/images/runner/{deathglitch => death1}/death10080.png (100%) rename assets/images/runner/{deathglitch => death1}/death10081.png (100%) rename assets/images/runner/{death => death2}/death20001.png (100%) rename assets/images/runner/{death => death2}/death20002.png (100%) rename assets/images/runner/{death => death2}/death20003.png (100%) rename assets/images/runner/{death => death2}/death20004.png (100%) rename assets/images/runner/{death => death2}/death20005.png (100%) rename assets/images/runner/{death => death2}/death20006.png (100%) rename assets/images/runner/{death => death2}/death20007.png (100%) rename assets/images/runner/{death => death2}/death20008.png (100%) rename assets/images/runner/{death => death2}/death20009.png (100%) rename assets/images/runner/{death => death2}/death20010.png (100%) rename assets/images/runner/{death => death2}/death20011.png (100%) rename assets/images/runner/{death => death2}/death20012.png (100%) rename assets/images/runner/{death => death2}/death20013.png (100%) rename assets/images/runner/{death => death2}/death20014.png (100%) rename assets/images/runner/{death => death2}/death20015.png (100%) rename assets/images/runner/{death => death2}/death20016.png (100%) rename assets/images/runner/{death => death2}/death20017.png (100%) rename assets/images/runner/{death => death2}/death20018.png (100%) rename assets/images/runner/{death => death2}/death20019.png (100%) rename assets/images/runner/{death => death2}/death20020.png (100%) rename assets/images/runner/{death => death2}/death20021.png (100%) rename assets/images/runner/{death => death2}/death20022.png (100%) rename assets/images/runner/{death => death2}/death20023.png (100%) rename assets/images/runner/{death => death2}/death20024.png (100%) rename assets/images/runner/{death => death2}/death20025.png (100%) rename assets/images/runner/{death => death2}/death20026.png (100%) rename assets/images/runner/{death => death2}/death20027.png (100%) rename assets/images/runner/{death => death2}/death20028.png (100%) rename assets/images/runner/{death => death2}/death20029.png (100%) rename assets/images/runner/{death => death2}/death20030.png (100%) rename assets/images/runner/{death => death2}/death20031.png (100%) rename assets/images/runner/{death => death2}/death20032.png (100%) rename assets/images/runner/{death => death2}/death20033.png (100%) rename assets/images/runner/{death => death2}/death20034.png (100%) rename assets/images/runner/{death => death2}/death20035.png (100%) rename assets/images/runner/{death => death2}/death20036.png (100%) rename assets/images/runner/{death => death2}/death20037.png (100%) rename assets/images/runner/{death => death2}/death20038.png (100%) rename assets/images/runner/{death => death2}/death20039.png (100%) rename assets/images/runner/{death => death2}/death20040.png (100%) rename assets/images/runner/{death => death2}/death20041.png (100%) rename assets/images/runner/{death => death2}/death20042.png (100%) rename assets/images/runner/{death => death2}/death20043.png (100%) rename assets/images/runner/{death => death2}/death20044.png (100%) rename assets/images/runner/{death => death2}/death20045.png (100%) rename assets/images/runner/{death => death2}/death20046.png (100%) rename assets/images/runner/{death => death2}/death20047.png (100%) rename assets/images/runner/{death => death2}/death20048.png (100%) rename assets/images/runner/{death => death2}/death20049.png (100%) rename assets/images/runner/{death => death2}/death20050.png (100%) rename assets/images/runner/{death => death2}/death20051.png (100%) rename assets/images/runner/{death => death2}/death20052.png (100%) rename assets/images/runner/{death => death2}/death20053.png (100%) rename assets/images/runner/{death => death2}/death20054.png (100%) rename assets/images/runner/{death => death2}/death20055.png (100%) rename assets/images/runner/{death => death2}/death20056.png (100%) rename assets/images/runner/{death => death2}/death20057.png (100%) diff --git a/assets/images/runner/deathglitch/death10001.png b/assets/images/runner/death1/death10001.png similarity index 100% rename from assets/images/runner/deathglitch/death10001.png rename to assets/images/runner/death1/death10001.png diff --git a/assets/images/runner/deathglitch/death10002.png b/assets/images/runner/death1/death10002.png similarity index 100% rename from assets/images/runner/deathglitch/death10002.png rename to assets/images/runner/death1/death10002.png diff --git a/assets/images/runner/deathglitch/death10003.png b/assets/images/runner/death1/death10003.png similarity index 100% rename from assets/images/runner/deathglitch/death10003.png rename to assets/images/runner/death1/death10003.png diff --git a/assets/images/runner/deathglitch/death10004.png b/assets/images/runner/death1/death10004.png similarity index 100% rename from assets/images/runner/deathglitch/death10004.png rename to assets/images/runner/death1/death10004.png diff --git a/assets/images/runner/deathglitch/death10005.png b/assets/images/runner/death1/death10005.png similarity index 100% rename from assets/images/runner/deathglitch/death10005.png rename to assets/images/runner/death1/death10005.png diff --git a/assets/images/runner/deathglitch/death10006.png b/assets/images/runner/death1/death10006.png similarity index 100% rename from assets/images/runner/deathglitch/death10006.png rename to assets/images/runner/death1/death10006.png diff --git a/assets/images/runner/deathglitch/death10007.png b/assets/images/runner/death1/death10007.png similarity index 100% rename from assets/images/runner/deathglitch/death10007.png rename to assets/images/runner/death1/death10007.png diff --git a/assets/images/runner/deathglitch/death10008.png b/assets/images/runner/death1/death10008.png similarity index 100% rename from assets/images/runner/deathglitch/death10008.png rename to assets/images/runner/death1/death10008.png diff --git a/assets/images/runner/deathglitch/death10009.png b/assets/images/runner/death1/death10009.png similarity index 100% rename from assets/images/runner/deathglitch/death10009.png rename to assets/images/runner/death1/death10009.png diff --git a/assets/images/runner/deathglitch/death10010.png b/assets/images/runner/death1/death10010.png similarity index 100% rename from assets/images/runner/deathglitch/death10010.png rename to assets/images/runner/death1/death10010.png diff --git a/assets/images/runner/deathglitch/death10011.png b/assets/images/runner/death1/death10011.png similarity index 100% rename from assets/images/runner/deathglitch/death10011.png rename to assets/images/runner/death1/death10011.png diff --git a/assets/images/runner/deathglitch/death10012.png b/assets/images/runner/death1/death10012.png similarity index 100% rename from assets/images/runner/deathglitch/death10012.png rename to assets/images/runner/death1/death10012.png diff --git a/assets/images/runner/deathglitch/death10013.png b/assets/images/runner/death1/death10013.png similarity index 100% rename from assets/images/runner/deathglitch/death10013.png rename to assets/images/runner/death1/death10013.png diff --git a/assets/images/runner/deathglitch/death10014.png b/assets/images/runner/death1/death10014.png similarity index 100% rename from assets/images/runner/deathglitch/death10014.png rename to assets/images/runner/death1/death10014.png diff --git a/assets/images/runner/deathglitch/death10015.png b/assets/images/runner/death1/death10015.png similarity index 100% rename from assets/images/runner/deathglitch/death10015.png rename to assets/images/runner/death1/death10015.png diff --git a/assets/images/runner/deathglitch/death10016.png b/assets/images/runner/death1/death10016.png similarity index 100% rename from assets/images/runner/deathglitch/death10016.png rename to assets/images/runner/death1/death10016.png diff --git a/assets/images/runner/deathglitch/death10017.png b/assets/images/runner/death1/death10017.png similarity index 100% rename from assets/images/runner/deathglitch/death10017.png rename to assets/images/runner/death1/death10017.png diff --git a/assets/images/runner/deathglitch/death10018.png b/assets/images/runner/death1/death10018.png similarity index 100% rename from assets/images/runner/deathglitch/death10018.png rename to assets/images/runner/death1/death10018.png diff --git a/assets/images/runner/deathglitch/death10019.png b/assets/images/runner/death1/death10019.png similarity index 100% rename from assets/images/runner/deathglitch/death10019.png rename to assets/images/runner/death1/death10019.png diff --git a/assets/images/runner/deathglitch/death10020.png b/assets/images/runner/death1/death10020.png similarity index 100% rename from assets/images/runner/deathglitch/death10020.png rename to assets/images/runner/death1/death10020.png diff --git a/assets/images/runner/deathglitch/death10021.png b/assets/images/runner/death1/death10021.png similarity index 100% rename from assets/images/runner/deathglitch/death10021.png rename to assets/images/runner/death1/death10021.png diff --git a/assets/images/runner/deathglitch/death10022.png b/assets/images/runner/death1/death10022.png similarity index 100% rename from assets/images/runner/deathglitch/death10022.png rename to assets/images/runner/death1/death10022.png diff --git a/assets/images/runner/deathglitch/death10023.png b/assets/images/runner/death1/death10023.png similarity index 100% rename from assets/images/runner/deathglitch/death10023.png rename to assets/images/runner/death1/death10023.png diff --git a/assets/images/runner/deathglitch/death10024.png b/assets/images/runner/death1/death10024.png similarity index 100% rename from assets/images/runner/deathglitch/death10024.png rename to assets/images/runner/death1/death10024.png diff --git a/assets/images/runner/deathglitch/death10025.png b/assets/images/runner/death1/death10025.png similarity index 100% rename from assets/images/runner/deathglitch/death10025.png rename to assets/images/runner/death1/death10025.png diff --git a/assets/images/runner/deathglitch/death10026.png b/assets/images/runner/death1/death10026.png similarity index 100% rename from assets/images/runner/deathglitch/death10026.png rename to assets/images/runner/death1/death10026.png diff --git a/assets/images/runner/deathglitch/death10027.png b/assets/images/runner/death1/death10027.png similarity index 100% rename from assets/images/runner/deathglitch/death10027.png rename to assets/images/runner/death1/death10027.png diff --git a/assets/images/runner/deathglitch/death10028.png b/assets/images/runner/death1/death10028.png similarity index 100% rename from assets/images/runner/deathglitch/death10028.png rename to assets/images/runner/death1/death10028.png diff --git a/assets/images/runner/deathglitch/death10029.png b/assets/images/runner/death1/death10029.png similarity index 100% rename from assets/images/runner/deathglitch/death10029.png rename to assets/images/runner/death1/death10029.png diff --git a/assets/images/runner/deathglitch/death10030.png b/assets/images/runner/death1/death10030.png similarity index 100% rename from assets/images/runner/deathglitch/death10030.png rename to assets/images/runner/death1/death10030.png diff --git a/assets/images/runner/deathglitch/death10031.png b/assets/images/runner/death1/death10031.png similarity index 100% rename from assets/images/runner/deathglitch/death10031.png rename to assets/images/runner/death1/death10031.png diff --git a/assets/images/runner/deathglitch/death10032.png b/assets/images/runner/death1/death10032.png similarity index 100% rename from assets/images/runner/deathglitch/death10032.png rename to assets/images/runner/death1/death10032.png diff --git a/assets/images/runner/deathglitch/death10033.png b/assets/images/runner/death1/death10033.png similarity index 100% rename from assets/images/runner/deathglitch/death10033.png rename to assets/images/runner/death1/death10033.png diff --git a/assets/images/runner/deathglitch/death10034.png b/assets/images/runner/death1/death10034.png similarity index 100% rename from assets/images/runner/deathglitch/death10034.png rename to assets/images/runner/death1/death10034.png diff --git a/assets/images/runner/deathglitch/death10035.png b/assets/images/runner/death1/death10035.png similarity index 100% rename from assets/images/runner/deathglitch/death10035.png rename to assets/images/runner/death1/death10035.png diff --git a/assets/images/runner/deathglitch/death10036.png b/assets/images/runner/death1/death10036.png similarity index 100% rename from assets/images/runner/deathglitch/death10036.png rename to assets/images/runner/death1/death10036.png diff --git a/assets/images/runner/deathglitch/death10037.png b/assets/images/runner/death1/death10037.png similarity index 100% rename from assets/images/runner/deathglitch/death10037.png rename to assets/images/runner/death1/death10037.png diff --git a/assets/images/runner/deathglitch/death10038.png b/assets/images/runner/death1/death10038.png similarity index 100% rename from assets/images/runner/deathglitch/death10038.png rename to assets/images/runner/death1/death10038.png diff --git a/assets/images/runner/deathglitch/death10039.png b/assets/images/runner/death1/death10039.png similarity index 100% rename from assets/images/runner/deathglitch/death10039.png rename to assets/images/runner/death1/death10039.png diff --git a/assets/images/runner/deathglitch/death10040.png b/assets/images/runner/death1/death10040.png similarity index 100% rename from assets/images/runner/deathglitch/death10040.png rename to assets/images/runner/death1/death10040.png diff --git a/assets/images/runner/deathglitch/death10041.png b/assets/images/runner/death1/death10041.png similarity index 100% rename from assets/images/runner/deathglitch/death10041.png rename to assets/images/runner/death1/death10041.png diff --git a/assets/images/runner/deathglitch/death10042.png b/assets/images/runner/death1/death10042.png similarity index 100% rename from assets/images/runner/deathglitch/death10042.png rename to assets/images/runner/death1/death10042.png diff --git a/assets/images/runner/deathglitch/death10043.png b/assets/images/runner/death1/death10043.png similarity index 100% rename from assets/images/runner/deathglitch/death10043.png rename to assets/images/runner/death1/death10043.png diff --git a/assets/images/runner/deathglitch/death10044.png b/assets/images/runner/death1/death10044.png similarity index 100% rename from assets/images/runner/deathglitch/death10044.png rename to assets/images/runner/death1/death10044.png diff --git a/assets/images/runner/deathglitch/death10045.png b/assets/images/runner/death1/death10045.png similarity index 100% rename from assets/images/runner/deathglitch/death10045.png rename to assets/images/runner/death1/death10045.png diff --git a/assets/images/runner/deathglitch/death10046.png b/assets/images/runner/death1/death10046.png similarity index 100% rename from assets/images/runner/deathglitch/death10046.png rename to assets/images/runner/death1/death10046.png diff --git a/assets/images/runner/deathglitch/death10047.png b/assets/images/runner/death1/death10047.png similarity index 100% rename from assets/images/runner/deathglitch/death10047.png rename to assets/images/runner/death1/death10047.png diff --git a/assets/images/runner/deathglitch/death10048.png b/assets/images/runner/death1/death10048.png similarity index 100% rename from assets/images/runner/deathglitch/death10048.png rename to assets/images/runner/death1/death10048.png diff --git a/assets/images/runner/deathglitch/death10049.png b/assets/images/runner/death1/death10049.png similarity index 100% rename from assets/images/runner/deathglitch/death10049.png rename to assets/images/runner/death1/death10049.png diff --git a/assets/images/runner/deathglitch/death10050.png b/assets/images/runner/death1/death10050.png similarity index 100% rename from assets/images/runner/deathglitch/death10050.png rename to assets/images/runner/death1/death10050.png diff --git a/assets/images/runner/deathglitch/death10051.png b/assets/images/runner/death1/death10051.png similarity index 100% rename from assets/images/runner/deathglitch/death10051.png rename to assets/images/runner/death1/death10051.png diff --git a/assets/images/runner/deathglitch/death10052.png b/assets/images/runner/death1/death10052.png similarity index 100% rename from assets/images/runner/deathglitch/death10052.png rename to assets/images/runner/death1/death10052.png diff --git a/assets/images/runner/deathglitch/death10053.png b/assets/images/runner/death1/death10053.png similarity index 100% rename from assets/images/runner/deathglitch/death10053.png rename to assets/images/runner/death1/death10053.png diff --git a/assets/images/runner/deathglitch/death10054.png b/assets/images/runner/death1/death10054.png similarity index 100% rename from assets/images/runner/deathglitch/death10054.png rename to assets/images/runner/death1/death10054.png diff --git a/assets/images/runner/deathglitch/death10055.png b/assets/images/runner/death1/death10055.png similarity index 100% rename from assets/images/runner/deathglitch/death10055.png rename to assets/images/runner/death1/death10055.png diff --git a/assets/images/runner/deathglitch/death10056.png b/assets/images/runner/death1/death10056.png similarity index 100% rename from assets/images/runner/deathglitch/death10056.png rename to assets/images/runner/death1/death10056.png diff --git a/assets/images/runner/deathglitch/death10057.png b/assets/images/runner/death1/death10057.png similarity index 100% rename from assets/images/runner/deathglitch/death10057.png rename to assets/images/runner/death1/death10057.png diff --git a/assets/images/runner/deathglitch/death10058.png b/assets/images/runner/death1/death10058.png similarity index 100% rename from assets/images/runner/deathglitch/death10058.png rename to assets/images/runner/death1/death10058.png diff --git a/assets/images/runner/deathglitch/death10059.png b/assets/images/runner/death1/death10059.png similarity index 100% rename from assets/images/runner/deathglitch/death10059.png rename to assets/images/runner/death1/death10059.png diff --git a/assets/images/runner/deathglitch/death10060.png b/assets/images/runner/death1/death10060.png similarity index 100% rename from assets/images/runner/deathglitch/death10060.png rename to assets/images/runner/death1/death10060.png diff --git a/assets/images/runner/deathglitch/death10061.png b/assets/images/runner/death1/death10061.png similarity index 100% rename from assets/images/runner/deathglitch/death10061.png rename to assets/images/runner/death1/death10061.png diff --git a/assets/images/runner/deathglitch/death10062.png b/assets/images/runner/death1/death10062.png similarity index 100% rename from assets/images/runner/deathglitch/death10062.png rename to assets/images/runner/death1/death10062.png diff --git a/assets/images/runner/deathglitch/death10063.png b/assets/images/runner/death1/death10063.png similarity index 100% rename from assets/images/runner/deathglitch/death10063.png rename to assets/images/runner/death1/death10063.png diff --git a/assets/images/runner/deathglitch/death10064.png b/assets/images/runner/death1/death10064.png similarity index 100% rename from assets/images/runner/deathglitch/death10064.png rename to assets/images/runner/death1/death10064.png diff --git a/assets/images/runner/deathglitch/death10065.png b/assets/images/runner/death1/death10065.png similarity index 100% rename from assets/images/runner/deathglitch/death10065.png rename to assets/images/runner/death1/death10065.png diff --git a/assets/images/runner/deathglitch/death10066.png b/assets/images/runner/death1/death10066.png similarity index 100% rename from assets/images/runner/deathglitch/death10066.png rename to assets/images/runner/death1/death10066.png diff --git a/assets/images/runner/deathglitch/death10067.png b/assets/images/runner/death1/death10067.png similarity index 100% rename from assets/images/runner/deathglitch/death10067.png rename to assets/images/runner/death1/death10067.png diff --git a/assets/images/runner/deathglitch/death10068.png b/assets/images/runner/death1/death10068.png similarity index 100% rename from assets/images/runner/deathglitch/death10068.png rename to assets/images/runner/death1/death10068.png diff --git a/assets/images/runner/deathglitch/death10069.png b/assets/images/runner/death1/death10069.png similarity index 100% rename from assets/images/runner/deathglitch/death10069.png rename to assets/images/runner/death1/death10069.png diff --git a/assets/images/runner/deathglitch/death10070.png b/assets/images/runner/death1/death10070.png similarity index 100% rename from assets/images/runner/deathglitch/death10070.png rename to assets/images/runner/death1/death10070.png diff --git a/assets/images/runner/deathglitch/death10071.png b/assets/images/runner/death1/death10071.png similarity index 100% rename from assets/images/runner/deathglitch/death10071.png rename to assets/images/runner/death1/death10071.png diff --git a/assets/images/runner/deathglitch/death10072.png b/assets/images/runner/death1/death10072.png similarity index 100% rename from assets/images/runner/deathglitch/death10072.png rename to assets/images/runner/death1/death10072.png diff --git a/assets/images/runner/deathglitch/death10073.png b/assets/images/runner/death1/death10073.png similarity index 100% rename from assets/images/runner/deathglitch/death10073.png rename to assets/images/runner/death1/death10073.png diff --git a/assets/images/runner/deathglitch/death10074.png b/assets/images/runner/death1/death10074.png similarity index 100% rename from assets/images/runner/deathglitch/death10074.png rename to assets/images/runner/death1/death10074.png diff --git a/assets/images/runner/deathglitch/death10075.png b/assets/images/runner/death1/death10075.png similarity index 100% rename from assets/images/runner/deathglitch/death10075.png rename to assets/images/runner/death1/death10075.png diff --git a/assets/images/runner/deathglitch/death10076.png b/assets/images/runner/death1/death10076.png similarity index 100% rename from assets/images/runner/deathglitch/death10076.png rename to assets/images/runner/death1/death10076.png diff --git a/assets/images/runner/deathglitch/death10077.png b/assets/images/runner/death1/death10077.png similarity index 100% rename from assets/images/runner/deathglitch/death10077.png rename to assets/images/runner/death1/death10077.png diff --git a/assets/images/runner/deathglitch/death10078.png b/assets/images/runner/death1/death10078.png similarity index 100% rename from assets/images/runner/deathglitch/death10078.png rename to assets/images/runner/death1/death10078.png diff --git a/assets/images/runner/deathglitch/death10079.png b/assets/images/runner/death1/death10079.png similarity index 100% rename from assets/images/runner/deathglitch/death10079.png rename to assets/images/runner/death1/death10079.png diff --git a/assets/images/runner/deathglitch/death10080.png b/assets/images/runner/death1/death10080.png similarity index 100% rename from assets/images/runner/deathglitch/death10080.png rename to assets/images/runner/death1/death10080.png diff --git a/assets/images/runner/deathglitch/death10081.png b/assets/images/runner/death1/death10081.png similarity index 100% rename from assets/images/runner/deathglitch/death10081.png rename to assets/images/runner/death1/death10081.png diff --git a/assets/images/runner/death/death20001.png b/assets/images/runner/death2/death20001.png similarity index 100% rename from assets/images/runner/death/death20001.png rename to assets/images/runner/death2/death20001.png diff --git a/assets/images/runner/death/death20002.png b/assets/images/runner/death2/death20002.png similarity index 100% rename from assets/images/runner/death/death20002.png rename to assets/images/runner/death2/death20002.png diff --git a/assets/images/runner/death/death20003.png b/assets/images/runner/death2/death20003.png similarity index 100% rename from assets/images/runner/death/death20003.png rename to assets/images/runner/death2/death20003.png diff --git a/assets/images/runner/death/death20004.png b/assets/images/runner/death2/death20004.png similarity index 100% rename from assets/images/runner/death/death20004.png rename to assets/images/runner/death2/death20004.png diff --git a/assets/images/runner/death/death20005.png b/assets/images/runner/death2/death20005.png similarity index 100% rename from assets/images/runner/death/death20005.png rename to assets/images/runner/death2/death20005.png diff --git a/assets/images/runner/death/death20006.png b/assets/images/runner/death2/death20006.png similarity index 100% rename from assets/images/runner/death/death20006.png rename to assets/images/runner/death2/death20006.png diff --git a/assets/images/runner/death/death20007.png b/assets/images/runner/death2/death20007.png similarity index 100% rename from assets/images/runner/death/death20007.png rename to assets/images/runner/death2/death20007.png diff --git a/assets/images/runner/death/death20008.png b/assets/images/runner/death2/death20008.png similarity index 100% rename from assets/images/runner/death/death20008.png rename to assets/images/runner/death2/death20008.png diff --git a/assets/images/runner/death/death20009.png b/assets/images/runner/death2/death20009.png similarity index 100% rename from assets/images/runner/death/death20009.png rename to assets/images/runner/death2/death20009.png diff --git a/assets/images/runner/death/death20010.png b/assets/images/runner/death2/death20010.png similarity index 100% rename from assets/images/runner/death/death20010.png rename to assets/images/runner/death2/death20010.png diff --git a/assets/images/runner/death/death20011.png b/assets/images/runner/death2/death20011.png similarity index 100% rename from assets/images/runner/death/death20011.png rename to assets/images/runner/death2/death20011.png diff --git a/assets/images/runner/death/death20012.png b/assets/images/runner/death2/death20012.png similarity index 100% rename from assets/images/runner/death/death20012.png rename to assets/images/runner/death2/death20012.png diff --git a/assets/images/runner/death/death20013.png b/assets/images/runner/death2/death20013.png similarity index 100% rename from assets/images/runner/death/death20013.png rename to assets/images/runner/death2/death20013.png diff --git a/assets/images/runner/death/death20014.png b/assets/images/runner/death2/death20014.png similarity index 100% rename from assets/images/runner/death/death20014.png rename to assets/images/runner/death2/death20014.png diff --git a/assets/images/runner/death/death20015.png b/assets/images/runner/death2/death20015.png similarity index 100% rename from assets/images/runner/death/death20015.png rename to assets/images/runner/death2/death20015.png diff --git a/assets/images/runner/death/death20016.png b/assets/images/runner/death2/death20016.png similarity index 100% rename from assets/images/runner/death/death20016.png rename to assets/images/runner/death2/death20016.png diff --git a/assets/images/runner/death/death20017.png b/assets/images/runner/death2/death20017.png similarity index 100% rename from assets/images/runner/death/death20017.png rename to assets/images/runner/death2/death20017.png diff --git a/assets/images/runner/death/death20018.png b/assets/images/runner/death2/death20018.png similarity index 100% rename from assets/images/runner/death/death20018.png rename to assets/images/runner/death2/death20018.png diff --git a/assets/images/runner/death/death20019.png b/assets/images/runner/death2/death20019.png similarity index 100% rename from assets/images/runner/death/death20019.png rename to assets/images/runner/death2/death20019.png diff --git a/assets/images/runner/death/death20020.png b/assets/images/runner/death2/death20020.png similarity index 100% rename from assets/images/runner/death/death20020.png rename to assets/images/runner/death2/death20020.png diff --git a/assets/images/runner/death/death20021.png b/assets/images/runner/death2/death20021.png similarity index 100% rename from assets/images/runner/death/death20021.png rename to assets/images/runner/death2/death20021.png diff --git a/assets/images/runner/death/death20022.png b/assets/images/runner/death2/death20022.png similarity index 100% rename from assets/images/runner/death/death20022.png rename to assets/images/runner/death2/death20022.png diff --git a/assets/images/runner/death/death20023.png b/assets/images/runner/death2/death20023.png similarity index 100% rename from assets/images/runner/death/death20023.png rename to assets/images/runner/death2/death20023.png diff --git a/assets/images/runner/death/death20024.png b/assets/images/runner/death2/death20024.png similarity index 100% rename from assets/images/runner/death/death20024.png rename to assets/images/runner/death2/death20024.png diff --git a/assets/images/runner/death/death20025.png b/assets/images/runner/death2/death20025.png similarity index 100% rename from assets/images/runner/death/death20025.png rename to assets/images/runner/death2/death20025.png diff --git a/assets/images/runner/death/death20026.png b/assets/images/runner/death2/death20026.png similarity index 100% rename from assets/images/runner/death/death20026.png rename to assets/images/runner/death2/death20026.png diff --git a/assets/images/runner/death/death20027.png b/assets/images/runner/death2/death20027.png similarity index 100% rename from assets/images/runner/death/death20027.png rename to assets/images/runner/death2/death20027.png diff --git a/assets/images/runner/death/death20028.png b/assets/images/runner/death2/death20028.png similarity index 100% rename from assets/images/runner/death/death20028.png rename to assets/images/runner/death2/death20028.png diff --git a/assets/images/runner/death/death20029.png b/assets/images/runner/death2/death20029.png similarity index 100% rename from assets/images/runner/death/death20029.png rename to assets/images/runner/death2/death20029.png diff --git a/assets/images/runner/death/death20030.png b/assets/images/runner/death2/death20030.png similarity index 100% rename from assets/images/runner/death/death20030.png rename to assets/images/runner/death2/death20030.png diff --git a/assets/images/runner/death/death20031.png b/assets/images/runner/death2/death20031.png similarity index 100% rename from assets/images/runner/death/death20031.png rename to assets/images/runner/death2/death20031.png diff --git a/assets/images/runner/death/death20032.png b/assets/images/runner/death2/death20032.png similarity index 100% rename from assets/images/runner/death/death20032.png rename to assets/images/runner/death2/death20032.png diff --git a/assets/images/runner/death/death20033.png b/assets/images/runner/death2/death20033.png similarity index 100% rename from assets/images/runner/death/death20033.png rename to assets/images/runner/death2/death20033.png diff --git a/assets/images/runner/death/death20034.png b/assets/images/runner/death2/death20034.png similarity index 100% rename from assets/images/runner/death/death20034.png rename to assets/images/runner/death2/death20034.png diff --git a/assets/images/runner/death/death20035.png b/assets/images/runner/death2/death20035.png similarity index 100% rename from assets/images/runner/death/death20035.png rename to assets/images/runner/death2/death20035.png diff --git a/assets/images/runner/death/death20036.png b/assets/images/runner/death2/death20036.png similarity index 100% rename from assets/images/runner/death/death20036.png rename to assets/images/runner/death2/death20036.png diff --git a/assets/images/runner/death/death20037.png b/assets/images/runner/death2/death20037.png similarity index 100% rename from assets/images/runner/death/death20037.png rename to assets/images/runner/death2/death20037.png diff --git a/assets/images/runner/death/death20038.png b/assets/images/runner/death2/death20038.png similarity index 100% rename from assets/images/runner/death/death20038.png rename to assets/images/runner/death2/death20038.png diff --git a/assets/images/runner/death/death20039.png b/assets/images/runner/death2/death20039.png similarity index 100% rename from assets/images/runner/death/death20039.png rename to assets/images/runner/death2/death20039.png diff --git a/assets/images/runner/death/death20040.png b/assets/images/runner/death2/death20040.png similarity index 100% rename from assets/images/runner/death/death20040.png rename to assets/images/runner/death2/death20040.png diff --git a/assets/images/runner/death/death20041.png b/assets/images/runner/death2/death20041.png similarity index 100% rename from assets/images/runner/death/death20041.png rename to assets/images/runner/death2/death20041.png diff --git a/assets/images/runner/death/death20042.png b/assets/images/runner/death2/death20042.png similarity index 100% rename from assets/images/runner/death/death20042.png rename to assets/images/runner/death2/death20042.png diff --git a/assets/images/runner/death/death20043.png b/assets/images/runner/death2/death20043.png similarity index 100% rename from assets/images/runner/death/death20043.png rename to assets/images/runner/death2/death20043.png diff --git a/assets/images/runner/death/death20044.png b/assets/images/runner/death2/death20044.png similarity index 100% rename from assets/images/runner/death/death20044.png rename to assets/images/runner/death2/death20044.png diff --git a/assets/images/runner/death/death20045.png b/assets/images/runner/death2/death20045.png similarity index 100% rename from assets/images/runner/death/death20045.png rename to assets/images/runner/death2/death20045.png diff --git a/assets/images/runner/death/death20046.png b/assets/images/runner/death2/death20046.png similarity index 100% rename from assets/images/runner/death/death20046.png rename to assets/images/runner/death2/death20046.png diff --git a/assets/images/runner/death/death20047.png b/assets/images/runner/death2/death20047.png similarity index 100% rename from assets/images/runner/death/death20047.png rename to assets/images/runner/death2/death20047.png diff --git a/assets/images/runner/death/death20048.png b/assets/images/runner/death2/death20048.png similarity index 100% rename from assets/images/runner/death/death20048.png rename to assets/images/runner/death2/death20048.png diff --git a/assets/images/runner/death/death20049.png b/assets/images/runner/death2/death20049.png similarity index 100% rename from assets/images/runner/death/death20049.png rename to assets/images/runner/death2/death20049.png diff --git a/assets/images/runner/death/death20050.png b/assets/images/runner/death2/death20050.png similarity index 100% rename from assets/images/runner/death/death20050.png rename to assets/images/runner/death2/death20050.png diff --git a/assets/images/runner/death/death20051.png b/assets/images/runner/death2/death20051.png similarity index 100% rename from assets/images/runner/death/death20051.png rename to assets/images/runner/death2/death20051.png diff --git a/assets/images/runner/death/death20052.png b/assets/images/runner/death2/death20052.png similarity index 100% rename from assets/images/runner/death/death20052.png rename to assets/images/runner/death2/death20052.png diff --git a/assets/images/runner/death/death20053.png b/assets/images/runner/death2/death20053.png similarity index 100% rename from assets/images/runner/death/death20053.png rename to assets/images/runner/death2/death20053.png diff --git a/assets/images/runner/death/death20054.png b/assets/images/runner/death2/death20054.png similarity index 100% rename from assets/images/runner/death/death20054.png rename to assets/images/runner/death2/death20054.png diff --git a/assets/images/runner/death/death20055.png b/assets/images/runner/death2/death20055.png similarity index 100% rename from assets/images/runner/death/death20055.png rename to assets/images/runner/death2/death20055.png diff --git a/assets/images/runner/death/death20056.png b/assets/images/runner/death2/death20056.png similarity index 100% rename from assets/images/runner/death/death20056.png rename to assets/images/runner/death2/death20056.png diff --git a/assets/images/runner/death/death20057.png b/assets/images/runner/death2/death20057.png similarity index 100% rename from assets/images/runner/death/death20057.png rename to assets/images/runner/death2/death20057.png diff --git a/lib/main.dart b/lib/main.dart index b8715af..626f1a0 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -170,7 +170,7 @@ class MyGame extends BaseGame with PanDetector, TapDetector, KeyboardEvents { gameState = GameState(); runner = Runner(); - await runner.load(loadSpriteAnimation); + await runner.load(); loaded = true; _distance = TextComponent("Time: 0", @@ -539,8 +539,6 @@ class MyGame extends BaseGame with PanDetector, TapDetector, KeyboardEvents { if (!playingMusic && kIsWeb) { playMusic(); } - print(event.data.logicalKey.keyId); - print(event.data.keyLabel); if (event is RawKeyDownEvent) { action = true; keyboardKey = null; diff --git a/lib/runner.dart b/lib/runner.dart index 1bdced6..2172bb5 100644 --- a/lib/runner.dart +++ b/lib/runner.dart @@ -35,7 +35,6 @@ class Runner extends Component with HasGameRef { String previousState = "run"; var runnerPosition = Vector2(0, 0); late Vector2 runnerSize; - // late Rect runnerRect; bool dead = false; void setUp() { @@ -69,7 +68,6 @@ class Runner extends Component with HasGameRef { @override void render(Canvas c) { super.render(c); - // getSprite().render(c, position: sprite.position, size: sprite.size); getSprite().render(c, position: Vector2(sprite.position.x - sprite.size.x / 3, sprite.position.y - sprite.size.y / 3), @@ -346,12 +344,6 @@ class Runner extends Component with HasGameRef { event("run"); } break; - case "center": - // if (runnerState == "fall") { - // updateLevel(); - // event("float"); - // } - break; } } @@ -524,210 +516,54 @@ class Runner extends Component with HasGameRef { } } - Future load(loadSpriteAnimation) async { + Future load() async { List satellites = []; for (int i = 1; i <= 38; i++) { satellites.add(await Flame.images.load( 'runner/satellite/satellite00${i < 10 ? "0" + i.toString() : i.toString()}.png')); } - List runs = []; - for (int i = 1; i <= 38; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(i - 1), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/run/run00${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - runs.add(Sprite(await composition.compose())); - } - SpriteAnimation running = - SpriteAnimation.spriteList(runs, stepTime: 0.02, loop: true); + await loadSpriteAnimation("run", 38, satellites: satellites); - List jumps = []; - for (int i = 1; i <= 6; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(i - 1), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/jump/jump00${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - jumps.add(Sprite(await composition.compose())); - } - - SpriteAnimation jumping = - SpriteAnimation.spriteList(jumps, stepTime: 0.02, loop: false); - - List ducks = []; - for (int i = 1; i <= 38; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(i - 1), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/duck1/duck100${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - ducks.add(Sprite(await composition.compose())); - } + SpriteAnimation jumping = await loadSpriteAnimation("jump", 6, + satellites: satellites, loop: false); SpriteAnimation ducking = - SpriteAnimation.spriteList(ducks, stepTime: 0.02, loop: true); - - List ducks2 = []; - for (int i = 1; i <= 38; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(i - 1), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/duck2/duck200${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - ducks2.add(Sprite(await composition.compose())); - } + await loadSpriteAnimation("duck1", 38, satellites: satellites); SpriteAnimation ducking2 = - SpriteAnimation.spriteList(ducks2, stepTime: 0.02, loop: true); - - List ducks3 = []; - for (int i = 1; i <= 38; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(i - 1), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/duck3/duck300${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - ducks3.add(Sprite(await composition.compose())); - } + await loadSpriteAnimation("duck2", 38, satellites: satellites); SpriteAnimation ducking3 = - SpriteAnimation.spriteList(ducks3, stepTime: 0.02, loop: true); + await loadSpriteAnimation("duck3", 38, satellites: satellites); - List kicks = []; - for (int i = 1; i <= 38; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(i - 1), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/attack1/attack100${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); + SpriteAnimation kicking = await loadSpriteAnimation("attack1", 38, + satellites: satellites, loop: false); - kicks.add(Sprite(await composition.compose())); - } + SpriteAnimation kicking2 = await loadSpriteAnimation("attack2", 38, + satellites: satellites, loop: false); - SpriteAnimation kicking = - SpriteAnimation.spriteList(kicks, stepTime: 0.02, loop: false); - - List kicks2 = []; - for (int i = 1; i <= 38; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(i - 1), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/attack2/attack200${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - kicks2.add(Sprite(await composition.compose())); - } - - SpriteAnimation kicking2 = - SpriteAnimation.spriteList(kicks2, stepTime: 0.02, loop: false); - - List kicks3 = []; - for (int i = 1; i <= 38; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(i - 1), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/attack3/attack300${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - kicks3.add(Sprite(await composition.compose())); - } - - SpriteAnimation kicking3 = - SpriteAnimation.spriteList(kicks3, stepTime: 0.02, loop: false); - - List floats = []; - for (int i = 1; i <= 44; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(((i - 1) % 38)), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/hover1/hover100${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - floats.add(Sprite(await composition.compose())); - } + SpriteAnimation kicking3 = await loadSpriteAnimation("attack3", 38, + satellites: satellites, loop: false); SpriteAnimation floating = - SpriteAnimation.spriteList(floats, stepTime: 0.02, loop: true); - - List floats2 = []; - for (int i = 1; i <= 44; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(((i - 1) % 38)), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/hover2/hover200${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - floats2.add(Sprite(await composition.compose())); - } + await loadSpriteAnimation("hover1", 44, satellites: satellites); SpriteAnimation floating2 = - SpriteAnimation.spriteList(floats2, stepTime: 0.02, loop: true); - - List floats3 = []; - for (int i = 1; i <= 44; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(((i - 1) % 38)), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/hover3/hover300${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - floats3.add(Sprite(await composition.compose())); - } + await loadSpriteAnimation("hover2", 44, satellites: satellites); SpriteAnimation floating3 = - SpriteAnimation.spriteList(floats3, stepTime: 0.02, loop: true); + await loadSpriteAnimation("hover3", 44, satellites: satellites); - List falls = []; - for (int i = 1; i <= 20; i++) { - final composition = ImageComposition() - ..add(satellites.elementAt(((i - 1) % 20)), Vector2(0, 0)) - ..add( - await Flame.images.load( - 'runner/fall/fall00${i < 10 ? "0" + i.toString() : i.toString()}.png'), - Vector2(0, 0)); - - falls.add(Sprite(await composition.compose())); - } - - SpriteAnimation falling = - SpriteAnimation.spriteList(falls, stepTime: 0.02, loop: false); - - List dies = []; - for (int i = 1; i <= 57; i++) { - dies.add(Sprite(await Flame.images.load( - 'runner/death/death200${i < 10 ? "0" + i.toString() : i.toString()}.png'))); - } + SpriteAnimation falling = await loadSpriteAnimation("fall", 20, + satellites: satellites, loop: false); SpriteAnimation dying = - SpriteAnimation.spriteList(dies, stepTime: 0.02, loop: false); - - List dyingGlitches = []; - for (int i = 1; i <= 81; i++) { - dyingGlitches.add(Sprite(await Flame.images.load( - 'runner/deathglitch/death100${i < 10 ? "0" + i.toString() : i.toString()}.png'))); - } + await loadSpriteAnimation("death2", 57, loop: false); SpriteAnimation dyingGlitch = - SpriteAnimation.spriteList(dyingGlitches, stepTime: 0.02, loop: false); + await loadSpriteAnimation("death1", 81, loop: false); sprite = SpriteAnimationGroupComponent( animations: { @@ -753,6 +589,26 @@ class Runner extends Component with HasGameRef { changePriorityWithoutResorting(RUNNER_PRIORITY); } + Future loadSpriteAnimation(String name, int howManyFrames, + {List? satellites, bool loop = true}) async { + List sprites = []; + for (int i = 1; i <= howManyFrames; i++) { + final composition = ImageComposition(); + if (satellites != null) { + composition.add( + satellites.elementAt(((i - 1) % satellites.length)), Vector2(0, 0)); + } + composition.add( + await Flame.images.load( + 'runner/$name/${name}00${i < 10 ? "0" + i.toString() : i.toString()}.png'), + Vector2(0, 0)); + + sprites.add(Sprite(await composition.compose())); + } + + return SpriteAnimation.spriteList(sprites, stepTime: 0.02, loop: loop); + } + void resize(Vector2 newSize, double xRatio, double yRatio) { sprite.x = gameRef.blockSize * 2; sprite.y = gameRef.blockSize * level; diff --git a/pubspec.yaml b/pubspec.yaml index f6bba87..2d1c021 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -61,8 +61,8 @@ flutter: - assets/images/runner/run/ - assets/images/runner/fall/ - assets/images/runner/satellite/ - - assets/images/runner/death/ - - assets/images/runner/deathglitch/ + - assets/images/runner/death2/ + - assets/images/runner/death1/ - assets/images/runner/jump/ - assets/images/runner/attack1/ - assets/images/runner/attack2/