SetAreaCost() private method

private SetAreaCost ( int areaIndex, float areaCost ) : void
areaIndex int
areaCost float
return void
Esempio n. 1
0
 // Use this for initialization
 protected virtual void Start()
 {
     Icon = GameObject.FindGameObjectWithTag("IconLine");
     this.statsvalues.team = "Caos"; // Gitanesco por favor luego quitar
     LifeBar               = GameObject.FindGameObjectWithTag("LifeBar").GetComponent <Image>();
     Lifetext              = GameObject.FindGameObjectWithTag("LifeText").GetComponent <Text>();
     navagent              = this.GetComponent <UnityEngine.AI.NavMeshAgent>();
     navagent.speed        = this.statsvalues.speed / 70;
     LifeBar.fillAmount    = this.statsvalues.life / this.statsvalues.totallife;
     Lifetext.text         = (int)this.statsvalues.life + " / " + (int)this.statsvalues.totallife + "                      +" + this.statsvalues.regen;
     this.colliderchampion = this.GetComponent <Collider>();
     navagent.SetAreaCost(4, 5);
     line          = this.Icon.GetComponent <LineRenderer>();
     MinimapCamera = GameObject.FindGameObjectWithTag("MinimapCamera").GetComponent <Camera>();
 }
 static public int SetAreaCost(IntPtr l)
 {
     try {
         UnityEngine.AI.NavMeshAgent self = (UnityEngine.AI.NavMeshAgent)checkSelf(l);
         System.Int32 a1;
         checkType(l, 2, out a1);
         System.Single a2;
         checkType(l, 3, out a2);
         self.SetAreaCost(a1, a2);
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static int SetAreaCost(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         UnityEngine.AI.NavMeshAgent obj = (UnityEngine.AI.NavMeshAgent)ToLua.CheckObject(L, 1, typeof(UnityEngine.AI.NavMeshAgent));
         int   arg0 = (int)LuaDLL.luaL_checknumber(L, 2);
         float arg1 = (float)LuaDLL.luaL_checknumber(L, 3);
         obj.SetAreaCost(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }