Exemple #1
0
 public KeyReset(Transform _initialTransform, KeyFrom _from)
 {
     initialTransform = _initialTransform;
     if (_initialTransform != null)
     {
         initialPosition = _initialTransform.position;
         initialRotation = _initialTransform.rotation;
     }
     from = _from;
 }
Exemple #2
0
        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);
        }
Exemple #3
0
    public void AddKeyInitialPosition(Transform _tr, KeyFrom _from)
    {
        int currentlyHold = collectables[(int)CollectableType.Key];

        KeysReset[currentlyHold - 1] = new KeyReset(_tr, _from);
    }
Exemple #4
0
        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;
        }