Add new upgrade GoldenBomb: +1 bomb & +1 flame

This commit is contained in:
Denis-Cosmin Nutiu 2019-08-17 11:45:15 +03:00
parent 826e714797
commit 21fe05bdee
7 changed files with 155 additions and 16 deletions

View file

@ -12,7 +12,6 @@ GameObject:
- component: {fileID: 7037551310800415105}
- component: {fileID: 7958292204112110464}
- component: {fileID: 5334633105760309190}
- component: {fileID: 6293070509487257227}
m_Layer: 0
m_Name: FlameUpgrade
m_TagString: Untagged
@ -120,15 +119,3 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 94153367f2364ab38597c8f4a6521909, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &6293070509487257227
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7385886653159515755}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94153367f2364ab38597c8f4a6521909, type: 3}
m_Name:
m_EditorClassIdentifier:

View file

@ -0,0 +1,121 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &4467162782262204990
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5103883358052461890}
- component: {fileID: 3057588250431493961}
- component: {fileID: 234472779121130071}
- component: {fileID: 5391029322786980951}
m_Layer: 0
m_Name: GoldenBombUpgrade
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5103883358052461890
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4467162782262204990}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 226.39688, y: 753.2948, z: -16.29858}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &3057588250431493961
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4467162782262204990}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 0
m_SelectedEditorRenderState: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 5b4a5aab9761a49faa85fef071ef948c, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 1, y: 1}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!114 &234472779121130071
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4467162782262204990}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 13e9051b005746efb7e4ab749d62ad03, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!61 &5391029322786980951
BoxCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4467162782262204990}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0.5, y: 0.5}
m_SpriteTilingProperty:
border: {x: 0, y: 0, z: 0, w: 0}
pivot: {x: 0, y: 0}
oldSize: {x: 1, y: 1}
newSize: {x: 1, y: 1}
adaptiveTilingThreshold: 0.5
drawMode: 0
adaptiveTiling: 0
m_AutoTiling: 0
serializedVersion: 2
m_Size: {x: 1, y: 1}
m_EdgeRadius: 0

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f981d1f62161f491eb8e3806305c32a7
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -19,6 +19,8 @@ namespace src.Helpers
Resources.Load<GameObject>("Ammo/BombUpgrade");
public static readonly GameObject FlamesIncreaseUpgrade =
Resources.Load<GameObject>("Ammo/FlameUpgrade");
public static readonly GameObject GoldenBombUpgrade =
Resources.Load<GameObject>("GoldenBombUpgrade/FlameUpgrade");
/* Enemies */
public static readonly GameObject GreenEnemy = Resources.Load<GameObject>("Enemies/SnowEnemyRandom");

View file

@ -2,7 +2,6 @@ using src.Helpers;
namespace src.Level
{
using System;
using UnityEngine;
namespace src.Level
@ -22,11 +21,16 @@ namespace src.Level
public static class LevelResource
{
private static readonly GameObject[] AllUpgrades =
{PrefabAtlas.FlamesIncreaseUpgrade, PrefabAtlas.BombsIncreaseUpgrade, PrefabAtlas.SpeedIncreaseUpgrade};
{
PrefabAtlas.FlamesIncreaseUpgrade, PrefabAtlas.BombsIncreaseUpgrade, PrefabAtlas.SpeedIncreaseUpgrade,
PrefabAtlas.GoldenBombUpgrade
};
private static readonly GameObject[] SnowWallsDestructible =
{PrefabAtlas.DestructibleSnow, PrefabAtlas.DestructibleHighSnow};
private static readonly GameObject[] SnowWallsIndestructible = {PrefabAtlas.IndestructibleWoodCrate};
/* Used to store information about the level. */
private static readonly LevelData[] LevelData =
{

View file

@ -0,0 +1,15 @@
using src.Base;
namespace src.Upgrade
{
/* Adds one firepower and one bomb. */
public class GoldenBombUpgrade : UpgradeBase
{
public override void PerformUpgrade()
{
var bombManager = GameManager.GetBombsUtilManager();
bombManager.IncreaseAllowedBombs();
bombManager.IncreasePower();
}
}
}

View file

@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 13e9051b005746efb7e4ab749d62ad03
timeCreated: 1566031123