public void ParamaterControllInit(ParamVariable param, bool valMax) { this.p = param; this.valMax = valMax; startP = valMax ? p.m : p.c; endP = startP; }
public static Tuple <ConstVariable, int> CreateVariable(IEnumerable <Token> tokens, string flag, int i) { ConstVariable variable = null; var array = flag.Split(Strings.Split); var key = array[0]; if (!key.StartsWith(Alat)) { variable = new ConstVariable { Value = flag, Name = key, }; } else { variable = new ParamVariable { Value = flag, Name = key, }; } if (array.Length == 1) { return(Tuple.Create <ConstVariable, int>(variable, i)); } variable.NotSelf = true; Util.SetInvokeParam(tokens, variable, flag, i); return(Tuple.Create <ConstVariable, int>(variable, i + variable.ParamTokenCount)); }
public void RecurciveMove() { if (targetList.Count == 0) { StopWalk(); Begin(); this.p = null; this.targetList = null; if (!(trapPrepared is null)) { trapPrepared.SetActive(true); // TODO: trap process // ex. status.MOV.c -= 1; trapPrepared = null; } return; } ; pos += targetList[0]; startP = endP; if (valMax) { endP = startP - map.GetMoveCost(pos); } else { endP = startP - diffP; } Vector3 v = map.HexUnit2World(targetList[0]); target += v; if (v.x > 0) { turnRight(); } if (v.x < 0) { turnLeft(); } targetList.RemoveAt(0); }