子曦199107
子曦199107
关注数: 7
粉丝数: 3
发帖数: 71
关注贴吧数: 6
求美工!!! 您要是人在大连,对游戏感兴趣,在美工方面有些基础,有做游戏的想法,请加微信号shengchuan7176。我也只是个菜鸟,希望大家可以一起学习。
有美工吗? 想做一个盗墓类的游戏,需要一些美术资源,有兴趣的请留言,有没有经验不重要,可以付费,不过不会太高。
有喜欢盗墓笔记的吗? 个人想做一个盗墓类的游戏,需要一些美术资源,有兴趣的请留言,有没有经验不重要,可以付费,不过不会太高。
喜欢盗墓笔记的进。 想做一个盗墓类的游戏,需要一些美术资源,有兴趣的请留言,有没有经验不重要,可以付费,不过不会太高。
求助贴!!!! 自己的照片放在了公司内网的U盘中,在外网中如何才能拷贝出来??? 插到外网的电脑上只能显示盘符之后提示如图。求大神指点!!!图片来自:http://tieba.baidu.com/mo/q/checkurl?url=http%3A%2F%2Fxiangce.baidu.com%2Fpicture%2Falbum%2Flist%2F50174c515077a2d6201a3d10600fedff7d931228&urlrefer=5b760e257ba8dc616116ecaef0031bc7
求助贴!!!! 自己的照片放在了公司内网的U盘中,在外网中如何才能拷贝出来??? 插到外网的电脑上只能显示盘符之后提示如图。求大神指点!!!
求助贴 已经看过了一些程序方面的书了,但是感觉没有学会什么知识。小一点的程序可以自己写。 做软件只能在各种平台上拖控件。我现在应该如何提高自己?求大神指点!!!!!
求助贴!!!! 已经看过了很多程序方面的书了,但是感觉没有学会什么知识。小一点的程序可以自己写。 做软件只能在各种平台上拖控件。我现在应该如何提高自己?求大神指点!!!!!
如何判断指针未初始化??? VS2010定义NULL为0,当指针为空时,我如何可以确定该指针为空的(未定义),如果使用 NULL编译过程中会把其看成0。求大神详解!!!
武器攻击检测问题 void Update () { if (Input.GetMouseButtonDown (0)) { startPosition = transform.position; hit = Physics.OverlapSphere (startPosition, 1.0f, 1); { for(int i=0;i<=hit.Length-1;i++) { if(hit[i].tag=="Enemy") { EnimyAIContoller enemy=hit[i].transform.GetComponent<EnimyAIContoller>();此处问题? if(enemy) // 此处有问题。。。。。。。。。。。。。。。 { enemy.state=EnimyAIContoller.currentState.die; enemy.ani.Play("die2"); GameObject.Destroy(enemy); } break; }}}}}} 为什么EnimyAIContoller enemy=hit[i].transform.GetComponent<EnimyAIContoller>();这句话有的时候会有 NullReferenceException: Object reference not set to an instance of an object AttackTest.Update () (at Assets/_Script/AttackTest.cs:35) 这样的问题???不能每次都引用成功 用了一个if语句进行检测时,不再有错误了,但是会导致武器攻击检测很不理想。有时武器攻击会正常,但是大部分时候不能正常工作。
武器攻击检测问题 void Update () { if (Input.GetMouseButtonDown (0)) { startPosition = transform.position; hit = Physics.OverlapSphere (startPosition, 1.0f, 1); { for(int i=0;i<=hit.Length-1;i++) { if(hit[i].tag=="Enemy") { EnimyAIContoller enemy=hit[i].transform.GetComponent<EnimyAIContoller>();此处问题? if(enemy) // 此处有问题。。。。。。。。。。。。。。。 { enemy.state=EnimyAIContoller.currentState.die; enemy.ani.Play("die2"); GameObject.Destroy(enemy); } break; }}}}}} 为什么EnimyAIContoller enemy=hit[i].transform.GetComponent<EnimyAIContoller>();这句话有的时候会有 NullReferenceException: Object reference not set to an instance of an object AttackTest.Update () (at Assets/_Script/AttackTest.cs:35) 这样的问题???不能每次都引用成功 用了一个if语句进行检测时,不再有错误了,但是会导致武器攻击检测很不理想。有时武器攻击会正常,但是大部分时候不能正常工作。
武器攻击检测问题 void Update () { if (Input.GetMouseButtonDown (0)) { startPosition = transform.position; hit = Physics.OverlapSphere (startPosition, 1.0f, 1); { for(int i=0;i<=hit.Length-1;i++) { if(hit[i].tag=="Enemy") { EnimyAIContoller enemy=hit[i].transform.GetComponent<EnimyAIContoller>();此处问题? if(enemy) // 此处有问题。。。。。。。。。。。。。。。 { enemy.state=EnimyAIContoller.currentState.die; enemy.ani.Play("die2"); GameObject.Destroy(enemy); } break; }}}}}} 为什么EnimyAIContoller enemy=hit[i].transform.GetComponent<EnimyAIContoller>();这句话有的时候会有 NullReferenceException: Object reference not set to an instance of an object AttackTest.Update () (at Assets/_Script/AttackTest.cs:35) 这样的问题???不能每次都引用成功 用了一个if语句进行检测时,不再有错误了,但是会导致武器攻击检测很不理想。有时武器攻击会正常,但是大部分时候不能正常工作。
GetComponent的问题!!!!!! GetComponent放在update函数中有NullReferenceException: Object reference not set to an instance of an object的错误 kingController.cs文件 using UnityEngine; using System.Collections; public class kingController : MonoBehaviour { public float speed=3.0f; public Animator animator; CharacterController character; public bool attack=false; Vector3 Vspeed = Vector3.zero; CollisionFlags collisionFlags; public bool enemyAttack; GameObject obj; void Start () { animator = GetComponent<Animator> (); character = GetComponent<CharacterController> (); AttackTest obj = GetComponent<AttackTest> (); print (obj.attack.ToString()); enemyAttack = GetComponent<AttackTest> ().attack;//这句错误。。。。 } // Update is called once per frame void Update () { //print ("king "+obj.transform.position.ToString ()); enemyAttack = GetComponent<AttackTest> ().attack; 目的是从另一个脚本中获取一个bool类型的值。脚本名是AttackTest(作用是检测武器打击到敌人)这两个脚本是绑定在同一个物体上。(不在一个绑定在同一个物体上有影响吗?) AttackTest.cs文件 using UnityEngine; using System.Collections; public class AttackTest : MonoBehaviour { Vector3 startPosition; RaycastHit hitOut; Collider[] hit; public bool attack=false; // Use this for initialization void Start () { } // Update is called once per frame void Update () { //attack = false; if (Input.GetMouseButtonDown (0)) { startPosition = transform.position; hit = Physics.OverlapSphere (startPosition, 1.0f, 1); { for(int i=0;i<=hit.Length-1;i++) { if(hit[i].tag=="Enemy") { //print ("attack!!!"); attack=true; //print(attack.ToString()); break; } } } } }
1
下一页