THE UNMATCHED POWER OF THE SUN
This commit is contained in:
parent
3364b5df68
commit
43a0b83748
10 changed files with 134 additions and 9 deletions
|
|
@ -46,9 +46,14 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
abilityName: Magic Missile
|
abilityName: Magic Missile
|
||||||
thisPlayer: {fileID: 0}
|
thisPlayer: {fileID: 0}
|
||||||
|
canCooldown: 1
|
||||||
cooldown: 0.2
|
cooldown: 0.2
|
||||||
accuracy: 1
|
accuracy: 1
|
||||||
bulletLifetime: 3
|
bulletLifetime: 3
|
||||||
damage: 5
|
damage: 5
|
||||||
projectileSpeed: 16
|
projectileSpeed: 16
|
||||||
|
fireMode: 1
|
||||||
|
projectileCount: 1
|
||||||
|
offset: {x: 1, y: 1}
|
||||||
|
angle: 0
|
||||||
projectile: {fileID: 41144518337917555, guid: c8c4bd2326cbed637aa720d1a4d73968, type: 3}
|
projectile: {fileID: 41144518337917555, guid: c8c4bd2326cbed637aa720d1a4d73968, type: 3}
|
||||||
|
|
|
||||||
|
|
@ -174,6 +174,37 @@ SpriteRenderer:
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 1
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!1 &1285645608580101256
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 6266582235186827771}
|
||||||
|
m_Layer: 6
|
||||||
|
m_Name: FiringPoint
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &6266582235186827771
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 1285645608580101256}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 1, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1955417614592701310}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!1 &1580711442395299301
|
--- !u!1 &1580711442395299301
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -649,6 +680,7 @@ Transform:
|
||||||
- {fileID: 3445211528256210067}
|
- {fileID: 3445211528256210067}
|
||||||
- {fileID: 9200583498738940138}
|
- {fileID: 9200583498738940138}
|
||||||
- {fileID: 5150015966705364997}
|
- {fileID: 5150015966705364997}
|
||||||
|
- {fileID: 1955417614592701310}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!212 &8885222195297553295
|
--- !u!212 &8885222195297553295
|
||||||
|
|
@ -802,6 +834,8 @@ MonoBehaviour:
|
||||||
speed: 8
|
speed: 8
|
||||||
cam: {fileID: 0}
|
cam: {fileID: 0}
|
||||||
mouseWorldPos: {x: 0, y: 0}
|
mouseWorldPos: {x: 0, y: 0}
|
||||||
|
firingPoint: {fileID: 6266582235186827771}
|
||||||
|
firingPointBase: {fileID: 1955417614592701310}
|
||||||
--- !u!1 &6396436912902618782
|
--- !u!1 &6396436912902618782
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
@ -976,3 +1010,35 @@ SpriteRenderer:
|
||||||
m_WasSpriteAssigned: 1
|
m_WasSpriteAssigned: 1
|
||||||
m_MaskInteraction: 0
|
m_MaskInteraction: 0
|
||||||
m_SpriteSortPoint: 0
|
m_SpriteSortPoint: 0
|
||||||
|
--- !u!1 &6725891226587269588
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 1955417614592701310}
|
||||||
|
m_Layer: 6
|
||||||
|
m_Name: FiringPointBase
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &1955417614592701310
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6725891226587269588}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children:
|
||||||
|
- {fileID: 6266582235186827771}
|
||||||
|
m_Father: {fileID: 5661264056639479186}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,13 @@
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class AbilityUpgrade : MonoBehaviour
|
public class AbilityUpgrade : ScriptableObject
|
||||||
{
|
{
|
||||||
[Header("Identification")]
|
[Header("Identification")]
|
||||||
public string upgradeName;
|
public string upgradeName;
|
||||||
public PlayerAbility thisPlayerAbility;
|
public PlayerAbility thisPlayerAbility;
|
||||||
|
|
||||||
|
public virtual void ApplyUpgrade()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
12
Assets/Scripts/AttackSpeedUpgrade.cs
Normal file
12
Assets/Scripts/AttackSpeedUpgrade.cs
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class AttackSpeedUpgrade : AbilityUpgrade
|
||||||
|
{
|
||||||
|
[SerializeField] private float speedUpgradeAmount;
|
||||||
|
|
||||||
|
public override void ApplyUpgrade()
|
||||||
|
{
|
||||||
|
base.ApplyUpgrade();
|
||||||
|
thisPlayerAbility.cooldown *= speedUpgradeAmount;
|
||||||
|
}
|
||||||
|
}
|
||||||
2
Assets/Scripts/AttackSpeedUpgrade.cs.meta
Normal file
2
Assets/Scripts/AttackSpeedUpgrade.cs.meta
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8cf716a335ed64e9c9c64a9e934acbd8
|
||||||
13
Assets/Scripts/EnemySpawner.cs
Normal file
13
Assets/Scripts/EnemySpawner.cs
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class EnemySpawner : MonoBehaviour
|
||||||
|
{
|
||||||
|
public Enemy[] enemiesToSpawn;
|
||||||
|
public float spawnRate;
|
||||||
|
public float currentSpawnTime;
|
||||||
|
|
||||||
|
public void SpawnEnemy()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
2
Assets/Scripts/EnemySpawner.cs.meta
Normal file
2
Assets/Scripts/EnemySpawner.cs.meta
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 1feaa0eb8751bf4a1b4acb1457d0c538
|
||||||
|
|
@ -2,19 +2,35 @@ using UnityEngine;
|
||||||
|
|
||||||
public class FireBullet : PlayerAbility
|
public class FireBullet : PlayerAbility
|
||||||
{
|
{
|
||||||
|
[Header("Stats")]
|
||||||
public float accuracy;
|
public float accuracy;
|
||||||
public float bulletLifetime;
|
public float bulletLifetime;
|
||||||
public float damage;
|
public float damage;
|
||||||
public float projectileSpeed;
|
public float projectileSpeed;
|
||||||
|
|
||||||
|
public enum FireMode {Angled, Offset};
|
||||||
|
[Header("Projectile")]
|
||||||
|
public FireMode fireMode = FireMode.Offset;
|
||||||
|
public float projectileCount;
|
||||||
|
public Vector2 offset;
|
||||||
|
public float angle;
|
||||||
[SerializeField] private Projectile projectile;
|
[SerializeField] private Projectile projectile;
|
||||||
protected override void AbilityEffects()
|
protected override void AbilityEffects()
|
||||||
{
|
{
|
||||||
Projectile newProjectile = Instantiate(projectile, transform.position, transform.rotation);
|
for (int i = 0; i < projectileCount; i++)
|
||||||
newProjectile.damage = damage;
|
{
|
||||||
newProjectile.speed = projectileSpeed;
|
Projectile newProjectile = Instantiate(projectile, thisPlayer.firingPointBase.position, transform.rotation);
|
||||||
newProjectile.lifetime = bulletLifetime;
|
newProjectile.RotateToTarget(thisPlayer.firingPoint.position);
|
||||||
newProjectile.RotateToTarget(thisPlayer.mouseWorldPos);
|
newProjectile.transform.position = thisPlayer.firingPoint.position; //me when i set the position 3 times in a row. but it's to prevent the bullets firing behind marisa
|
||||||
newProjectile.transform.Rotate(0, 0, Random.Range(-accuracy, accuracy));
|
if (fireMode == FireMode.Offset && projectileCount > 1)
|
||||||
newProjectile.tag = thisPlayer.tag;
|
{
|
||||||
|
newProjectile.transform.position += new Vector3(Random.Range(-offset.x, offset.x), Random.Range(-offset.y, offset.y));
|
||||||
|
}
|
||||||
|
newProjectile.damage = damage;
|
||||||
|
newProjectile.speed = projectileSpeed;
|
||||||
|
newProjectile.lifetime = bulletLifetime;
|
||||||
|
newProjectile.transform.Rotate(0, 0, Random.Range(-accuracy, accuracy));
|
||||||
|
newProjectile.tag = thisPlayer.tag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
using System;
|
using System;
|
||||||
|
using Core.Extensions;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
public class Marisa : Entity
|
public class Marisa : Entity
|
||||||
|
|
@ -6,9 +7,12 @@ public class Marisa : Entity
|
||||||
[Header("Mouse")]
|
[Header("Mouse")]
|
||||||
[SerializeField] private Camera cam;
|
[SerializeField] private Camera cam;
|
||||||
public Vector2 mouseWorldPos;
|
public Vector2 mouseWorldPos;
|
||||||
|
public Transform firingPointBase;
|
||||||
|
public Transform firingPoint;
|
||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
mouseWorldPos = cam.ScreenToWorldPoint(Input.mousePosition);
|
mouseWorldPos = cam.ScreenToWorldPoint(Input.mousePosition);
|
||||||
|
firingPointBase.Lookat2D(mouseWorldPos);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void FixedUpdate()
|
protected override void FixedUpdate()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue