AutoSummon 2 minions for necro on scene change
This commit is contained in:
parent
210d4049dd
commit
dc3be76a5f
@ -6834,6 +6834,7 @@ MonoBehaviour:
|
|||||||
- {fileID: 11400000, guid: baa6f2c09656e8148933cf51d6e9d0df, type: 2}
|
- {fileID: 11400000, guid: baa6f2c09656e8148933cf51d6e9d0df, type: 2}
|
||||||
- {fileID: 11400000, guid: 679598ad64000fa4aa4a8b5c1cb568e3, type: 2}
|
- {fileID: 11400000, guid: 679598ad64000fa4aa4a8b5c1cb568e3, type: 2}
|
||||||
- {fileID: 11400000, guid: 0c191267adf0be840a2ac87dfbcbacc2, type: 2}
|
- {fileID: 11400000, guid: 0c191267adf0be840a2ac87dfbcbacc2, type: 2}
|
||||||
|
- {fileID: 11400000, guid: 3cb8d7161315a384586026a48385b0b1, type: 2}
|
||||||
--- !u!1 &7475116341184709871
|
--- !u!1 &7475116341184709871
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -1,5 +1,54 @@
|
|||||||
%YAML 1.1
|
%YAML 1.1
|
||||||
%TAG !u! tag:unity3d.com,2011:
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!1 &2854504623699103925
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2788171593351923773}
|
||||||
|
- component: {fileID: 3034607606178470595}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: NecroAutoCastOnSceneRefresh
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &2788171593351923773
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2854504623699103925}
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 7484556474031461785}
|
||||||
|
m_RootOrder: 24
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &3034607606178470595
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 2854504623699103925}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: dd7e427c67a74ff4b8b8d14b39a134bc, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
possibleAutoSummons:
|
||||||
|
- {fileID: 11400000, guid: 0db150a6bbd0c1d478dbd3fc09a6ef85, type: 2}
|
||||||
|
- {fileID: 11400000, guid: 4b21d1ec90616ac4a8f0ff30311a6a1f, type: 2}
|
||||||
|
- {fileID: 11400000, guid: 6cf7c174663354f4bb94833236e61c18, type: 2}
|
||||||
|
- {fileID: 11400000, guid: f0272d37cc7635f4cbdfb40b1a16a9e7, type: 2}
|
||||||
--- !u!1001 &2176522877944764073
|
--- !u!1001 &2176522877944764073
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -289,6 +338,11 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 389de3cac2aa89247bd947ebc2fb91ac, type: 3}
|
m_Script: {fileID: 11500000, guid: 389de3cac2aa89247bd947ebc2fb91ac, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
|
--- !u!4 &7484556474031461785 stripped
|
||||||
|
Transform:
|
||||||
|
m_CorrespondingSourceObject: {fileID: 8785094005405139760, guid: 9c432d220280f704684a6d5b9354c782, type: 3}
|
||||||
|
m_PrefabInstance: {fileID: 2176522877944764073}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
--- !u!114 &7851041350907075303 stripped
|
--- !u!114 &7851041350907075303 stripped
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_CorrespondingSourceObject: {fileID: 8268627081631403086, guid: 9c432d220280f704684a6d5b9354c782, type: 3}
|
m_CorrespondingSourceObject: {fileID: 8268627081631403086, guid: 9c432d220280f704684a6d5b9354c782, type: 3}
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f861a28adf4fe7b44a7b1f9db0457a91
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -0,0 +1,32 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: a5d5cf82dd5c07f438f5809f773372e2, type: 3}
|
||||||
|
m_Name: 0-HumanSlashAbility
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
Icon: {fileID: 21300000, guid: 28a02df1369b7fd4eab040459b0cc450, type: 3}
|
||||||
|
targettingTags: []
|
||||||
|
tags: []
|
||||||
|
abilityEffects: []
|
||||||
|
castTime: 0.5
|
||||||
|
manaCost: 0
|
||||||
|
healthCost: 0
|
||||||
|
classResourceCost: 0
|
||||||
|
cooldown: 0
|
||||||
|
castableWhileMoving: 0
|
||||||
|
animationType: 2
|
||||||
|
slashPrefab: {fileID: 0}
|
||||||
|
regenHealthOnHit: 0
|
||||||
|
regenManaOnHit: 0
|
||||||
|
healthOnHit: 0
|
||||||
|
manaOnHit: 0
|
||||||
|
lifeSpan: 0
|
||||||
|
range: 0
|
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3cb8d7161315a384586026a48385b0b1
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -16,7 +16,7 @@ MonoBehaviour:
|
|||||||
- {fileID: 11400000, guid: 4e6f036fb4aad9b428694360fcc62f88, type: 2}
|
- {fileID: 11400000, guid: 4e6f036fb4aad9b428694360fcc62f88, type: 2}
|
||||||
influencingStats:
|
influencingStats:
|
||||||
- statTag: {fileID: 11400000, guid: 918ee6f8846e6a9449166ac16b6330ae, type: 2}
|
- statTag: {fileID: 11400000, guid: 918ee6f8846e6a9449166ac16b6330ae, type: 2}
|
||||||
percentInfluence: 0.15
|
percentInfluence: 0.2
|
||||||
baseValue: 2
|
baseValue: 2
|
||||||
damageType: 1
|
damageType: 1
|
||||||
AlliedTargetMultiplier: 1
|
AlliedTargetMultiplier: 1
|
||||||
|
@ -16,7 +16,7 @@ MonoBehaviour:
|
|||||||
- {fileID: 11400000, guid: 4e6f036fb4aad9b428694360fcc62f88, type: 2}
|
- {fileID: 11400000, guid: 4e6f036fb4aad9b428694360fcc62f88, type: 2}
|
||||||
influencingStats:
|
influencingStats:
|
||||||
- statTag: {fileID: 11400000, guid: 918ee6f8846e6a9449166ac16b6330ae, type: 2}
|
- statTag: {fileID: 11400000, guid: 918ee6f8846e6a9449166ac16b6330ae, type: 2}
|
||||||
percentInfluence: 0.15
|
percentInfluence: 0.2
|
||||||
baseValue: 1
|
baseValue: 1
|
||||||
damageType: 1
|
damageType: 1
|
||||||
AlliedTargetMultiplier: 1
|
AlliedTargetMultiplier: 1
|
||||||
|
@ -44,6 +44,12 @@ public class SummonAbility : BaseAbility
|
|||||||
InitializeStatsBasedOnOwner(user);
|
InitializeStatsBasedOnOwner(user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void AutoSummonOnSceneLoad(PhotonView user)
|
||||||
|
{
|
||||||
|
instantiatedMinion = PhotonNetwork.Instantiate("Abilities/" + minionPrefab.name, user.GetComponentInChildren<ProjectileSpawnLocationController>().transform.position, user.GetComponentInChildren<ProjectileSpawnLocationController>().transform.rotation);
|
||||||
|
InitializeStatsBasedOnOwner(user);
|
||||||
|
}
|
||||||
|
|
||||||
private void InitializeStatsBasedOnOwner(PhotonView user)
|
private void InitializeStatsBasedOnOwner(PhotonView user)
|
||||||
{
|
{
|
||||||
ownerStats = user.GetComponent<CharacterStats>();
|
ownerStats = user.GetComponent<CharacterStats>();
|
||||||
|
@ -13,6 +13,8 @@ public static class GameConstants
|
|||||||
public const string SunMapUsedKey = "sunMapUsed";
|
public const string SunMapUsedKey = "sunMapUsed";
|
||||||
public const string MoonMapUsedKey = "moonMapUsed";
|
public const string MoonMapUsedKey = "moonMapUsed";
|
||||||
|
|
||||||
|
public const string NecroAutoSummonOnSceneRefreshIndexKey = "necroASoSRIndex";
|
||||||
|
|
||||||
|
|
||||||
#region GetKeyMethods
|
#region GetKeyMethods
|
||||||
public static string GetPlayerAccountDataKey(string playerName)
|
public static string GetPlayerAccountDataKey(string playerName)
|
||||||
|
@ -4,15 +4,15 @@ using UnityEngine;
|
|||||||
|
|
||||||
public class ClassResourceSpender : MonoBehaviour
|
public class ClassResourceSpender : MonoBehaviour
|
||||||
{
|
{
|
||||||
RiftPlayer player;
|
protected RiftPlayer player;
|
||||||
Taggable playerTag;
|
protected Taggable playerTag;
|
||||||
ClassResource classResource;
|
protected ClassResource classResource;
|
||||||
ClassAbilityPriorityManager abilityPriorityManager;
|
protected ClassAbilityPriorityManager abilityPriorityManager;
|
||||||
AbilityCooldownTracker abilityCooldownTracker;
|
protected AbilityCooldownTracker abilityCooldownTracker;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void Awake()
|
protected virtual void Awake()
|
||||||
{
|
{
|
||||||
player = GetComponentInParent<RiftPlayer>();
|
player = GetComponentInParent<RiftPlayer>();
|
||||||
abilityPriorityManager = player.GetComponentInChildren<ClassAbilityPriorityManager>();
|
abilityPriorityManager = player.GetComponentInChildren<ClassAbilityPriorityManager>();
|
||||||
@ -23,7 +23,7 @@ public class ClassResourceSpender : MonoBehaviour
|
|||||||
classResource.onResourceChanged.AddListener(OnClassResourceValueChanged);
|
classResource.onResourceChanged.AddListener(OnClassResourceValueChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClassResourceValueChanged(float value)
|
public virtual void OnClassResourceValueChanged(float value)
|
||||||
{
|
{
|
||||||
BaseAbility autocastAbility = abilityPriorityManager.GetHighestPriorityAvailableAbility();
|
BaseAbility autocastAbility = abilityPriorityManager.GetHighestPriorityAvailableAbility();
|
||||||
|
|
||||||
|
40
Assets/Scripts/Networking/NecroAutoSummonOnSceneRefresh.cs
Normal file
40
Assets/Scripts/Networking/NecroAutoSummonOnSceneRefresh.cs
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class NecroAutoSummonOnSceneRefresh : MonoBehaviour
|
||||||
|
{
|
||||||
|
public List<BaseAbility> possibleAutoSummons = new List<BaseAbility>();
|
||||||
|
|
||||||
|
protected RiftPlayer player;
|
||||||
|
|
||||||
|
BaseAbility autocastAbility;
|
||||||
|
|
||||||
|
int index = 0;
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
player = GetComponentInParent<RiftPlayer>();
|
||||||
|
|
||||||
|
index = PlayerPrefs.GetInt(GameConstants.PlayerPrefsKeys.NecroAutoSummonOnSceneRefreshIndexKey, 0);
|
||||||
|
index %= possibleAutoSummons.Count;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerator Start()
|
||||||
|
{
|
||||||
|
yield return new WaitForSeconds(1f);
|
||||||
|
|
||||||
|
autocastAbility = possibleAutoSummons[index];
|
||||||
|
(autocastAbility as SummonAbility).AutoSummonOnSceneLoad(player.photonView);
|
||||||
|
yield return new WaitForSeconds(0.5f);
|
||||||
|
|
||||||
|
index++;
|
||||||
|
|
||||||
|
autocastAbility = possibleAutoSummons[index];
|
||||||
|
(autocastAbility as SummonAbility).AutoSummonOnSceneLoad(player.photonView);
|
||||||
|
|
||||||
|
index++;
|
||||||
|
|
||||||
|
PlayerPrefs.SetInt(GameConstants.PlayerPrefsKeys.NecroAutoSummonOnSceneRefreshIndexKey, (index %= possibleAutoSummons.Count));
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: dd7e427c67a74ff4b8b8d14b39a134bc
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -94,7 +94,7 @@ Material:
|
|||||||
- _Mode: 0
|
- _Mode: 0
|
||||||
- _OcclusionStrength: 1
|
- _OcclusionStrength: 1
|
||||||
- _Parallax: 0.02
|
- _Parallax: 0.02
|
||||||
- _Rotation: 433.6615
|
- _Rotation: 13.934321
|
||||||
- _SmoothnessTextureChannel: 0
|
- _SmoothnessTextureChannel: 0
|
||||||
- _SpecularHighlights: 1
|
- _SpecularHighlights: 1
|
||||||
- _SrcBlend: 1
|
- _SrcBlend: 1
|
||||||
|
File diff suppressed because one or more lines are too long
@ -134,7 +134,7 @@ PlayerSettings:
|
|||||||
16:10: 1
|
16:10: 1
|
||||||
16:9: 1
|
16:9: 1
|
||||||
Others: 1
|
Others: 1
|
||||||
bundleVersion: 0.11.0
|
bundleVersion: 0.11.1
|
||||||
preloadedAssets:
|
preloadedAssets:
|
||||||
- {fileID: 947724257692438902, guid: cd9921cbc21600a45b5c842c4e6ef004, type: 3}
|
- {fileID: 947724257692438902, guid: cd9921cbc21600a45b5c842c4e6ef004, type: 3}
|
||||||
- {fileID: 753911528859556811, guid: bc291c869c1aa9744be1f56806b8c99d, type: 3}
|
- {fileID: 753911528859556811, guid: bc291c869c1aa9744be1f56806b8c99d, type: 3}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user