Boss Level Layout done (Its not perfect i know)

This commit is contained in:
GungHolo
2023-06-21 22:15:22 +02:00
parent adb328737f
commit 2bc4acf624
12 changed files with 3072 additions and 627 deletions

View File

@@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BossLevel : MonoBehaviour
{
[SerializeField] private GameObject thepoint;
[SerializeField] private Transform[] respawnPoints;
// Start is called before the first frame update
void Start()
{
thepoint = GameObject.Find("RespawnProjectile");
}
// Update is called once per frame
void Update()
{
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 31badcea47741d341b73273a4cb0b07e
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -23,11 +23,14 @@ public class KitchenGun : MonoBehaviour
public Vector2 shotSpeed = new Vector2(1f, 0f);
// Smallest step size for shot speed
private short shotSpeedStepSize = 50;
[SerializeField] private bool dim1;
private string dim;
// Start is called before the first frame update
void Start()
{
InvokeRepeating("RecurringBang",0f,shotIntervalSeconds);
if(dim1){dim="Dim1";} else {dim="Dim2";}
}
// Update is called once per frame
@@ -50,7 +53,7 @@ public class KitchenGun : MonoBehaviour
GameObject projectile = Instantiate(projectilePrefab,
position,
t.rotation);
projectile.transform.parent = GameObject.Find("Dim2").transform;
projectile.transform.parent = GameObject.Find(dim).transform;
// add force to projectile
projectile.GetComponent<Rigidbody2D>().velocity = shotSpeed;