public void init(Unit u, Unit target) { this.u = u; this.target = target; transform.localPosition = LayerV.UnitFX; var obj = new GameObject("Arrow model"); obj.transform.parent = transform; model = obj.AddComponent <ArrowModel>(); model.init(this); }
public ArrowViewModel(ArrowModel model) { Model = model; _PathPoints[0] = _PassedWayPoints[0] = _PassedWayPoints[1] = ExtTokenPoint.GetPoint(Model.StartTerrainName, "Приказ"); _PathPoints[1] = ExtTokenPoint.GetPoint(Model.EndTerrainName, "Приказ"); }