本文整理汇总了C#中GameEvent.setParameter方法的典型用法代码示例。如果您正苦于以下问题:C# GameEvent.setParameter方法的具体用法?C# GameEvent.setParameter怎么用?C# GameEvent.setParameter使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GameEvent
的用法示例。
在下文中一共展示了GameEvent.setParameter方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ChangeSwitchEventEditor
public ChangeSwitchEventEditor()
{
this.ge = ScriptableObject.CreateInstance<GameEvent> ();
ge.Name = this.EventName;
ge.setParameter ("switch", "");
ge.setParameter ("value", true);
}
示例2: parseEvent
private GameEvent parseEvent(GameEvent ge)
{
foreach (string contenido_param in ge.Params) {
object param = ge.getParameter(contenido_param);
if (contenido_param.Equals("direction")) {
Mover.Direction t = new Mover.Direction();
switch ((System.String)param) {
case "North": ge.setParameter(contenido_param, t); break;
case "East": ge.setParameter(contenido_param, t + 1); break;
case "South": ge.setParameter(contenido_param, t + 2); break;
case "West": ge.setParameter(contenido_param, t + 3); break;
}
} else {
if (param.GetType() == typeof(System.Int32)) {
int intParam = (int)param;
if (EntityMap.getInstance().getEntityMap().ContainsKey(intParam)) {
UnityEngine.Object go_src;
EntityMap.getInstance().getEntityMap().TryGetValue(intParam, out go_src);
ge.setParameter(contenido_param, go_src);
}
}/* else {
Debug.Log("====================================");
Debug.Log("tipo: " + param.GetType() + ", valor: " + param);
Debug.Log("====================================");
}*/
}
}
return ge;
}
示例3: AddItemEditor
public AddItemEditor()
{
this.ge = ScriptableObject.CreateInstance<GameEvent> ();
ge.Name = this.EventName;
ge.setParameter ("item", null);
ge.setParameter ("inventory", null);
}
示例4: MoveEventEditor
public MoveEventEditor()
{
this.ge = ScriptableObject.CreateInstance<GameEvent> ();
ge.Name = this.EventName;
ge.setParameter ("entity", null);
ge.setParameter ("cell", null);
}
示例5: useEvent
public void useEvent(GameEvent ge)
{
this.ge = ge;
this.ge.Name = this.EventName;
if (ge.getParameter ("switch") == null)
ge.setParameter ("switch", "");
if (ge.getParameter ("value") == null)
ge.setParameter ("value", true);
}