浏览代码

Fixes and Additions (#6)

/main
GitHub 5 年前
当前提交
0e9a7df4
共有 7 个文件被更改,包括 76 次插入2 次删除
  1. 4
      CHANGELOG.md
  2. 2
      Runtime/Ingredients/StateMachine/StateMachine.cs
  3. 2
      Runtime/LevelScripting/Logic/FlipFlopLogic.cs.meta
  4. 20
      Runtime/LevelScripting/Actions/AudioMixSnapshotAction.cs
  5. 11
      Runtime/LevelScripting/Actions/AudioMixSnapshotAction.cs.meta
  6. 28
      Runtime/LevelScripting/Logic/StateLogic.cs
  7. 11
      Runtime/LevelScripting/Logic/StateLogic.cs.meta

4
CHANGELOG.md


* Added OnColider Event : Perform calls upon collisions
* Added OnJoinBreak Event : Perform calls upon Rigid body joint break
* Added FlipFlop Logic : Two-state latch logic
* Added State Logic : Perform logic based on State Machine current state.
* Added Audio Mix Snapshot Action : Set Mixer Snapshots
* Added RigidBody Action : Perform actions on a rigidbody
* Added SetAnimatorParameterAction : Perform parameter setting on Animators
* Added Sacrifice Oldest option to Factory

## 2018.3.0
Initial Version
Initial Version

2
Runtime/Ingredients/StateMachine/StateMachine.cs


[ReorderableList, NonNullCheck]
public State[] States;
public State CurrentState { get { return m_CurrentState; } }
State m_CurrentState;
void Start()

2
Runtime/LevelScripting/Logic/FlipFlopLogic.cs.meta


serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
icon: {fileID: 2800000, guid: 6d0a734cdedf48d478f3fcc7612af66f, type: 3}
userData:
assetBundleName:
assetBundleVariant:

20
Runtime/LevelScripting/Actions/AudioMixSnapshotAction.cs


using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GameplayIngredients;
using GameplayIngredients.Actions;
using UnityEngine.Audio;
public class AudioMixSnapshotAction : ActionBase
{
[NonNullCheck]
public AudioMixer Mixer;
[Min(0.0f)]
public float TimeToReach = 1.0f;
public string SnapshotName = "master";
public override void Execute(GameObject instigator = null)
{
Mixer.TransitionToSnapshots(new AudioMixerSnapshot[]{ Mixer.FindSnapshot(SnapshotName)}, new float[]{ 1.0f}, TimeToReach);
}
}

11
Runtime/LevelScripting/Actions/AudioMixSnapshotAction.cs.meta


fileFormatVersion: 2
guid: 0b9f0f69fcd64a844806009285029727
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: bdcc63f36a8ac6643bbfb90bb398716a, type: 3}
userData:
assetBundleName:
assetBundleVariant:

28
Runtime/LevelScripting/Logic/StateLogic.cs


using GameplayIngredients.StateMachines;
using NaughtyAttributes;
using UnityEngine;
namespace GameplayIngredients.Logic
{
public class StateLogic : LogicBase
{
public StateMachine StateMachine;
public State TargetState;
[ReorderableList]
public Callable[] IfCurrentState;
[ReorderableList]
public Callable[] IfNotCurrentState;
public override void Execute(GameObject instigator = null)
{
if (StateMachine.CurrentState == TargetState && IfCurrentState != null && IfCurrentState.Length > 0)
Call(IfCurrentState, instigator);
if (StateMachine.CurrentState != TargetState && IfNotCurrentState != null && IfNotCurrentState.Length > 0)
Call(IfNotCurrentState, instigator);
}
}
}

11
Runtime/LevelScripting/Logic/StateLogic.cs.meta


fileFormatVersion: 2
guid: 8984afda389a94b48b9a3c0cbf794642
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {fileID: 2800000, guid: 6d0a734cdedf48d478f3fcc7612af66f, type: 3}
userData:
assetBundleName:
assetBundleVariant:
正在加载...
取消
保存