Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Core/Game/Effects/EffectManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ private static LSEffect GenEffect(string effectCode, int id = -1)
FastStack<LSEffect> pool;

if (!EffectPool.TryGetValue(effectCode, out pool)) {
Debug.LogError(string.Format("Effect not found with code {0} in pool. Did you remember to add it to the Lockstep Database?", effectCode));
return null;
}
LSEffect effect = null;
Expand Down
3 changes: 2 additions & 1 deletion Database/Resources/Empty.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,9 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 152766}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: .00999999978, y: .980000019, z: 0}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
Expand Down
54 changes: 54 additions & 0 deletions Database/Resources/EmptyEffect.prefab
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &152766
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 4
m_Component:
- 4: {fileID: 480028}
- 114: {fileID: 11423720}
m_Layer: 0
m_Name: EmptyEffect
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &480028
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 152766}
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_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
--- !u!114 &11423720
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 152766}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f1099df356bef4426908b9e979ad9339, type: 3}
m_Name:
m_EditorClassIdentifier:
defaultDuration: 0
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 152766}
m_IsPrefabParent: 1
8 changes: 8 additions & 0 deletions Database/Resources/EmptyEffect.prefab.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 35 additions & 0 deletions Example/ExampleCreateTestAgent.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
using UnityEngine;
using System.Collections;
using Lockstep;

namespace Lockstep.Example
{
public class ExampleCreateTestAgent : BehaviourHelper
{
protected FastList<LSAgent> spawnedAgents = new FastList<LSAgent> ();
public string agentName = "TestAgent";
public int agentsToSpawn = 2;

// Use this for initialization
void Start ()
{

}

// Update is called once per frame
void Update ()
{

}

protected override void OnGameStart ()
{
AgentController ac = AgentController.Create ();
PlayerManager.AddController (ac);

for (int i = 0; i < agentsToSpawn; i++) {
spawnedAgents.Add (ac.CreateAgent (agentName, Vector2d.zero));
}
}
}
}
12 changes: 12 additions & 0 deletions Example/ExampleCreateTestAgent.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Example/ExampleDatabase/Example_Database.asset
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ MonoBehaviour:
_description:
_icon: {fileID: 0}
_prefab: {fileID: 167620, guid: 479c1b29b5d8046428adaddf16b43ce8, type: 2}
_effectData: []
_effectData:
- _name: Muzzle Ball
_description:
_icon: {fileID: 0}
_prefab: {fileID: 152766, guid: 375e2715adad54b21ba75951c35ebf8f, type: 2}
_abilityData:
- _name: Move
_description:
Expand Down
580 changes: 245 additions & 335 deletions Example/ExampleScene.unity

Large diffs are not rendered by default.

13 changes: 9 additions & 4 deletions Example/TestBullet.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Transform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 15.286378, y: -4.2496395, z: -15.54683}
m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
Expand Down Expand Up @@ -74,23 +75,27 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 14e14365092354525b827ca9117ed940, type: 3}
m_Name:
m_EditorClassIdentifier:
Position:
x: 0
y: 0
z: 0
_speed: 1048576
_visualArc: 1
_delay: 0
_attachEndEffectToTarget: 0
_endEffect:
_hitFX:
CanRotate: 1
_startEffect: Muzzle Ball
_startFX: Muzzle Ball
IsActive: 0
UseEffects: 1
RotateHitFX: 1
_canVisualize: 1
_interpolationRate: 8
_exclusiveTargetType: 0
_targetingBehavior: 1
_targetPlatform: 0
_hitBehavior: 0
_angle: 32768
_radius: 131072
_lastingDuration: 0
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
Expand Down