Fix mobcat bullets
This commit is contained in:
parent
dd385f4898
commit
c27c634faa
@ -9520,7 +9520,7 @@ GameObject:
|
|||||||
- component: {fileID: 4482402865533696887}
|
- component: {fileID: 4482402865533696887}
|
||||||
- component: {fileID: 3311105517541852250}
|
- component: {fileID: 3311105517541852250}
|
||||||
m_Layer: 9
|
m_Layer: 9
|
||||||
m_Name: EnemyBullet
|
m_Name: MobcatBullet
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
m_NavMeshLayer: 0
|
m_NavMeshLayer: 0
|
||||||
@ -9611,7 +9611,7 @@ MonoBehaviour:
|
|||||||
Sprite: {fileID: 5552990435088311320}
|
Sprite: {fileID: 5552990435088311320}
|
||||||
Trail: {fileID: 4595570391660610945}
|
Trail: {fileID: 4595570391660610945}
|
||||||
Explosion: {fileID: 6411602551704027216}
|
Explosion: {fileID: 6411602551704027216}
|
||||||
Damage: 12
|
Damage: 3.4
|
||||||
--- !u!1 &5552990435088311320
|
--- !u!1 &5552990435088311320
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
@ -38,10 +38,10 @@ namespace Saltosion.OneWeapon.AI.Behaviours {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void Shoot() {
|
private void Shoot() {
|
||||||
Vector2 Direction = Follow.TargetDirection;
|
Vector2 Direction = Follow.TargetDirection.normalized;
|
||||||
GameObject ShotBulletObj = Instantiate(BulletPrefab, transform.position + (Vector3)Direction, new Quaternion());
|
GameObject ShotBulletObj = Instantiate(BulletPrefab, transform.position + (Vector3)Direction, new Quaternion());
|
||||||
Bullet ShotBullet = ShotBulletObj.GetComponent<Bullet>();
|
Bullet ShotBullet = ShotBulletObj.GetComponent<Bullet>();
|
||||||
ShotBullet.Direction = Direction.normalized;
|
ShotBullet.Direction = Direction;
|
||||||
ShotBullet.InitialRotation = Mathf.Atan2(Direction.y, Direction.x);
|
ShotBullet.InitialRotation = Mathf.Atan2(Direction.y, Direction.x);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
using System.Collections;
|
using UnityEngine;
|
||||||
using System.Collections.Generic;
|
|
||||||
using UnityEngine;
|
|
||||||
using Saltosion.OneWeapon.Player;
|
using Saltosion.OneWeapon.Player;
|
||||||
using Saltosion.OneWeapon.Enemies;
|
using Saltosion.OneWeapon.Enemies;
|
||||||
using Saltosion.OneWeapon.Effects;
|
using Saltosion.OneWeapon.Effects;
|
||||||
using Saltosion.OneWeapon.Environment;
|
|
||||||
|
|
||||||
namespace Saltosion.OneWeapon.Guns {
|
namespace Saltosion.OneWeapon.Guns {
|
||||||
[RequireComponent(typeof(Bullet))]
|
[RequireComponent(typeof(Bullet))]
|
||||||
public class EnemyBullet : MonoBehaviour {
|
public class MobcatBullet : MonoBehaviour {
|
||||||
|
|
||||||
public Rigidbody2D Body;
|
public Rigidbody2D Body;
|
||||||
public GameObject Sprite;
|
public GameObject Sprite;
|
Loading…
Reference in New Issue
Block a user