public KeyReset(Transform _initialTransform, KeyFrom _from) { initialTransform = _initialTransform; if (_initialTransform != null) { initialPosition = _initialTransform.position; initialRotation = _initialTransform.rotation; } from = _from; }
public static string BuildAccessNoKeyString(KeyFrom[] keys, out string strLocation) { strLocation = ""; if (keys == null || keys.Length == 0) return ""; string strValue = keys[0].Key; int nRet = strValue.IndexOf("|"); if (nRet == -1) return strValue; strLocation = strValue.Substring(0, nRet); return strValue.Substring(nRet + 1); }
public void AddKeyInitialPosition(Transform _tr, KeyFrom _from) { int currentlyHold = collectables[(int)CollectableType.Key]; KeysReset[currentlyHold - 1] = new KeyReset(_tr, _from); }
public static string BuildDisplayKeyString(KeyFrom[] keys) { if (keys == null || keys.Length == 0) return ""; string strResult = ""; foreach (KeyFrom entry in keys) { if (String.IsNullOrEmpty(entry.Logic) == false) { strResult += " " + entry.Logic + " "; } else if (String.IsNullOrEmpty(strResult) == false) strResult += " | "; strResult += entry.Key + ":" + entry.From; } return strResult; }