mirror of
https://github.com/RHeavenStudioPlus/HeavenStudioPlus.git
synced 2024-11-25 19:15:16 +00:00
619c01b77a
* 無駄 * spawn * Start Interval * new sprites, background particles * fix white flash * wip hit particle * finished hit particle * oops * oops2 * sorry last tweak * Damage * Merge manually * modified: Update() * fix particle layering * tweak particle more * more enemies * Changed the way effects are generated * animation fixes * attack fix * laser and enemy miss anim * sorry!!!!!!!!! * monitor animations * intro gate animations * trajectory * Pass Turn (WIP) * Animation Event * Fine placement * Pass Turn * Placement Pattern * EnemyType * icon * fix bg, fix animations, added smoke particle * Adding and modifying effects * I made a mistake in the operation --------- Co-authored-by: ev <85412919+evdial@users.noreply.github.com> Co-authored-by: ev <85412919+iloveoatmeal2022@users.noreply.github.com>
42 lines
No EOL
1 KiB
C#
42 lines
No EOL
1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
using HeavenStudio.Util;
|
|
|
|
namespace HeavenStudio.Games.Scripts_ShootEmUp
|
|
{
|
|
public class Ship : MonoBehaviour
|
|
{
|
|
public Animator shipAnim;
|
|
public Animator laserAnim;
|
|
public Animator damageAnim;
|
|
|
|
public bool isDamage = false;
|
|
// int life = 24;
|
|
|
|
public void Shoot()
|
|
{
|
|
shipAnim.DoScaledAnimationAsync("shipShoot", 1f);
|
|
laserAnim.DoScaledAnimationAsync("laser", 1f);
|
|
}
|
|
|
|
public void Damage()
|
|
{
|
|
// if (life > 0) {
|
|
// life = Mathf.Max(life - 8, 0);
|
|
// } else {
|
|
// // Gameover if you miss in next interval
|
|
// }
|
|
|
|
isDamage = true;
|
|
shipAnim.DoScaledAnimationAsync("shipDamage", 1f);
|
|
damageAnim.DoScaledAnimationAsync("damage", 0.5f);
|
|
}
|
|
|
|
public void DamageEnd()
|
|
{
|
|
isDamage = false;
|
|
}
|
|
}
|
|
} |