Skip to content
Snippets Groups Projects
Commit 83cadea1 authored by Michael LaFreniere's avatar Michael LaFreniere
Browse files

Added start of weapon scripts & to do .txt file

Scripts to be used by shops and modify the player stats (not implemented
yet)
Can create new weapons by clicking on the menu Assets > create > new
weapon
parent 2b691bc5
No related branches found
No related tags found
No related merge requests found
Showing
with 137 additions and 1 deletion
No preview for this file type
......@@ -46,9 +46,11 @@
</ItemGroup>
<ItemGroup>
<Compile Include="Assets\Scripts\CameraMovement.cs" />
<Compile Include="Assets\Scripts\CreateWeapon.cs" />
<Compile Include="Assets\Scripts\EnterDoor.cs" />
<Compile Include="Assets\Scripts\PlayerMovement.cs" />
<Compile Include="Assets\Scripts\ShopMenu.cs" />
<Compile Include="Assets\Scripts\WeaponStats.cs" />
<Reference Include="UnityEngine.UI">
<HintPath>C:/Program Files/Unity/Editor/Data/UnityExtensions/Unity/GUISystem/UnityEngine.UI.dll</HintPath>
</Reference>
......
Zookeepers Trial/Assets/Art/goldCoin5.png

3.07 KiB

fileFormatVersion: 2
guid: 9b74ad0ac10b84d4585fa9b9193db80d
timeCreated: 1477705485
licenseType: Free
TextureImporter:
fileIDToRecycleName: {}
serializedVersion: 2
mipmaps:
mipMapMode: 0
enableMipMap: 1
linearTexture: 0
correctGamma: 0
fadeOut: 0
borderMipMap: 0
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
grayScaleToAlpha: 0
generateCubemap: 0
cubemapConvolution: 0
cubemapConvolutionSteps: 7
cubemapConvolutionExponent: 1.5
seamlessCubemap: 0
textureFormat: -1
maxTextureSize: 2048
textureSettings:
filterMode: -1
aniso: -1
mipBias: -1
wrapMode: 1
nPOTScale: 0
lightmap: 0
rGBM: 0
compressionQuality: 50
allowsAlphaSplitting: 0
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spritePixelsToUnits: 100
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
buildTargetSettings: []
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
spritePackingTag:
userData:
assetBundleName:
assetBundleVariant:
using UnityEngine;
using System.Collections;
using UnityEditor;
// ** created by following the Creating An In-Game Shop Unity tutorial **
public class CreateWeapon {
[MenuItem("Assets/Create/New Weapon")] // can create this by going assets > create > new weapon
public static void MakeWeapon() {
WeaponStats weapon = ScriptableObject.CreateInstance<WeaponStats>();
AssetDatabase.CreateAsset(weapon, "Assets/NewWeapon.asset"); // we can edit fields in inspector
AssetDatabase.SaveAssets();
EditorUtility.FocusProjectWindow();
Selection.activeObject = weapon; // able to highlight it
}
}
fileFormatVersion: 2
guid: df79ca1bc38f91a4d9b0a063aa8f231b
timeCreated: 1477706469
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
......@@ -13,7 +13,7 @@ public class EnterDoor : MonoBehaviour {
void OnLevelWasLoaded() {
player.transform.position = spawnPoint[spawnPointIndex].position;
}
// when creating extra doors, add spawnPoint[] in correct order in the inspector.
void OnTriggerEnter2D(Collider2D collider) {
if (this.CompareTag("Church")) {
spawnPointIndex = 0;
......
using UnityEngine;
using System.Collections;
[System.Serializable]
// This class will be used to edit each individual weapon, both its stats and shop menu buttons!
public class WeaponStats : ScriptableObject { // notice this is not a MonoBehaviour class
// display fields for shop buttons
public string weaponName;
public int cost;
public string weaponDescription;
/* these fields will be based on our implementation (add/delete from this list based on
how we want to create our game. I made a short list for now. - Mike */
public float attackSpeed;
public int damageMin;
public int damageMax;
}
fileFormatVersion: 2
guid: 3a547104d9e25d749befd437b3ce1605
timeCreated: 1477705971
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
fileFormatVersion: 2
guid: f4e70db064b65a5449080f5aa0bf203b
folderAsset: yes
timeCreated: 1477707474
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:
File added
fileFormatVersion: 2
guid: f6a8cf841ee975f4ea4f4852d324830f
timeCreated: 1477707482
licenseType: Free
NativeFormatImporter:
userData:
assetBundleName:
assetBundleVariant:
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment