protected override object RunBlock() { plyVar plyVar = ((Variable_Block)base.paramBlocks[0]).RunAndGetVariable(null); if (plyVar == null) { return(null); } if (plyVar.variableType != typeof(float)) { base.LogError("The variable must be a Float type variable.", null); return(null); } float num = (float)plyVar.GetValue(); if (num <= 0.0) { return(null); } num -= Time.deltaTime; if (num <= 0.0) { num = 0f; plyVar.SetValue(num); base.RunChildBlocks(); } else { plyVar.SetValue(num); } return(null); }
public override object GetValue() { this.UpdateLocalValue(null); plyVar obj = this.v; if (obj == null) { return(null); } return(obj.GetValue()); }
protected string GetDataBindingLabel(DataBinding binding) { if (binding.dataContext == DataBinding.DataContext.Constant) { plyVar constant = binding.constant; if (((constant != null) ? constant.GetValue() : null) != null) { return(binding.constant.GetValue().ToString()); } return("null"); } if (binding.dataContext == DataBinding.DataContext.GlobalProperty) { if (binding.member == null) { return("null"); } return(BloxMemberInfo.SimpleMemberPath(binding.member)); } return("-select-"); }