Esempio n. 1
0
        public void Add(SkCond colCond)
        {
            SkFuncInOutPara funcOut = new SkFuncInOutPara(_inst, colCond._para);
            SkCondColDesc   cols    = funcOut.GetColDesc();

            if (cols.colTypes[0] == SkCondColDesc.ColType.ColName)
            {
                foreach (string str in cols.colStrings[0])
                {
                    Collider col = _inst._caster.GetCollider(str);
                    if (col != null && !_colPositions.ContainsKey(col))
                    {
                        _colPositions[col] = new Positions(col.Pos());
                    }
                }
            }
            else
            {
                //TODO : Getcollider by layer
                Debug.LogError("Unimplemented code for getting collider from collayer cond");

                /*
                 * foreach(string str in cols.colStrings[0])
                 * {
                 *      Collider col = _inst._caster.GetCollider(str);
                 *      if(col != null && !_colPositions.ContainsKey(col))
                 *      {
                 *              _colPositions[col] = new Positions(col.Pos());
                 *      }
                 * }
                 */
            }
        }
Esempio n. 2
0
        internal static SkFuncInOutPara TstInRange(SkInst inst, System.Object para)
        {
            SkFuncInOutPara funcOut = new SkFuncInOutPara(inst, para);

            // TODO code inst._caster.TstInRange(funcPara);
            return(funcOut);
        }
Esempio n. 3
0
        internal static SkFuncInOutPara TstColLayer(SkInst inst, System.Object strColDesc)
        {
            SkFuncInOutPara funcOut = new SkFuncInOutPara(inst, strColDesc);

            if (inst._colInfo == null)
            {
                return(funcOut);
            }

            SkCondColDesc cols = funcOut.GetColDesc();

            cols.colTypes[0] = cols.colTypes[1] = SkCondColDesc.ColType.ColLayer;
            if (cols.Contain(inst._colInfo))
            {
                SkEntity curTar = (SkEntity)inst._colInfo.hitTrans;
                if (curTar != null)
                {
                    funcOut._para = new List <SkEntity>()
                    {
                        curTar
                    };
                }
                funcOut._ret = true;
            }
            return(funcOut);
        }
Esempio n. 4
0
        public bool Tst(SkInst inst)
        {
            SkFuncInOutPara funcOut = _cond(inst, _para);

            _retTars = funcOut._ret ? (funcOut._para as List <SkEntity>) : null;
            return(funcOut._ret);
        }
Esempio n. 5
0
        // TBD : add external func for target???
        internal static SkFuncInOutPara TstExternalFunc(SkInst inst, System.Object para)
        {
            string[]        condDesc  = para as string[];
            SkFuncInOutPara funcInOut = new SkFuncInOutPara(inst, condDesc.Length < 2 ? null : condDesc[1]);

            inst._caster.SendMessage(condDesc[0], funcInOut, SendMessageOptions.DontRequireReceiver);
            return(funcInOut);
        }
Esempio n. 6
0
 public void SetCondRet(SkFuncInOutPara funcInOut)
 {
     if (_skCanLoop._bFailedRecv && _skCanLoop._casterId == funcInOut._inst._caster.GetId() && _skCanLoop._skillId == funcInOut._inst.SkillID)
     {
         funcInOut._ret = _skCanLoop._bLoop;
         _skCanLoop.Reset();
     }
 }
Esempio n. 7
0
        internal static SkFuncInOutPara TstColInfo(SkInst inst, System.Object para)
        {
            SkFuncInOutPara funcOut = new SkFuncInOutPara(inst, para);

            if (inst._colInfo == null)
            {
                return(funcOut);
            }

            SkEntity curTar = (SkEntity)inst._colInfo.hitTrans;

            if (curTar != null)
            {
                funcOut._para = new List <SkEntity>()
                {
                    curTar
                };
                funcOut._ret = true;
            }
            return(funcOut);
        }
Esempio n. 8
0
 public virtual void CondTstFunc(SkFuncInOutPara funcInOut)
 {
 }