...
 
Commits (2)
......@@ -24,7 +24,7 @@ namespace Space_Invaders.Common.Particles
public void SpawnExplosion(Vector3 position)
{
GameObject explosion = GameObject.Instantiate(this._explosionParticle, null, false);
GameObject explosion = Instantiate(this._explosionParticle, null, false);
explosion.transform.position = position;
}
#endregion Public Methods
......
......@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Space_Invaders.Common;
using Space_Invaders.Enemies.Behaviour;
using Space_Invaders.Missiles;
using Space_Invaders.Units.Model;
using UnityEngine;
using UnityEngine.SceneManagement;
......
......@@ -11,6 +11,9 @@ using UnityEngine;
namespace Space_Invaders.Init
{
/// <summary>
/// Main Initialization Point it passes references to the managers and connects gamelogic via delegates
/// </summary>
public class InitializationPoint : MonoBehaviour
{
#region Public Fields
......
......@@ -14,18 +14,16 @@ namespace Space_Invaders.Input
#endregion Protected Fields
#region Private Fields
/// <summary>
/// Input Manager uses input handlers for easy switch between input types if necessary
/// </summary>
private AInputHandler _inputHandler = null;
#endregion Private Fields
#region Unity Callbacks
private void Awake()
{
#if UNITY_EDITOR || UNITY_STANDALONE
this._inputHandler = new KeyboardInputHandler();
#endif
// this._inputHandler.OnInputEvent += type => Debug.Log(type);
}
private void Start()
......
using UnityEngine;
namespace Space_Invaders.Common
namespace Space_Invaders.Missiles
{
/// <summary>
/// Takes care of all missile based collisions, sending all the needed info to Missile Manager
/// </summary>
public class MissileController : MonoBehaviour
{
#region Public Fields
......@@ -80,7 +83,7 @@ namespace Space_Invaders.Common
if (other.CompareTag(this._wallTag))
{
GameObject otherGameObject = other.gameObject;
gameObject.SetActive(false);
this.gameObject.SetActive(false);
Destroy(otherGameObject);
OnMissileHitKillZone(this.gameObject);
......
using System;
using System.Collections.Generic;
using Space_Invaders.Common;
using Space_Invaders.Common.Model;
using Space_Invaders.Missiles.Model;
using UnityEngine;
using Random = UnityEngine.Random;
......
using Space_Invaders.Missiles;
using UnityEngine;
namespace Space_Invaders.Common.Model
namespace Space_Invaders.Missiles.Model
{
public sealed class MissileData
{
......
......@@ -50,10 +50,19 @@ namespace Space_Invaders.Player
this.OnPlayerFired(this._playerGameObject.transform.position);
break;
case InputType.Left:
if (this._playerGameObject.transform.position.x <= -9)
{
return;
}
this._playerGameObject.transform.position += Vector3.left * (Time.deltaTime * this._movementSpeed);
break;
case InputType.Right:
if (this._playerGameObject.transform.position.x >= 9)
{
return;
}
this._playerGameObject.transform.position += Vector3.right * (Time.deltaTime * this._movementSpeed);
break;
......
Please set game view to 945x1080 resolution for optimal experience.
# Assets
## Font
Kongtext by Codeman38
## SFX
All audio assets were created with SFXR
## GFX
All graphical assets were created from scratch with Aseprite
# Cheats
'+' - forces switch to boss phase
'-' - stops movements of the aliens
# Code Architecture
## Lack of plugins
Since repo is public I couldn't use plugins are essential for me (mainly Odin), lack of more complex serialization caused some atypical code. For example instead of creating Dictionary<Enum, GameObject> enemyPrefabs I had to use variable per enemy type and switches/helper methods.
## Scene Manager
To make scene loading easier I am using WIP version of my plugin "Scene Manager". It will detect any new scenes add them to the 'database' and create consts with their names. As stated before this is Work in Progress version so it may include some hacks and bugs