本文整理汇总了C#中UnityEngine.TrailRenderer类的典型用法代码示例。如果您正苦于以下问题:C# TrailRenderer类的具体用法?C# TrailRenderer怎么用?C# TrailRenderer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TrailRenderer类属于UnityEngine命名空间,在下文中一共展示了TrailRenderer类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ManualStart
// Use this for initialization
public void ManualStart()
{
_rigidbody = GetComponent<Rigidbody>();
_trail = GetComponent<TrailRenderer>();
_startTime = _trail.time;
_gameObject = gameObject;
}
开发者ID:pcpellegrini,项目名称:Aria,代码行数:8,代码来源:Bullet.cs
示例2: Start
void Start()
{
tr = GetComponent<TrailRenderer>();
tr.sortingLayerName = "Default";
tr.sortingOrder = 50;
}
开发者ID:SMBNoog,项目名称:IsleOfAdventure,代码行数:7,代码来源:TrailSortingOrder.cs
示例3: Awake
void Awake()
{
m_trailRenderer = GetComponent<TrailRenderer>();
m_points = new List<Vector3>();
m_camera = Camera.main;
m_toCommence = true;
}
开发者ID:kreeds,项目名称:TestProjectDemo,代码行数:7,代码来源:TrailListener.cs
示例4: Start
void Start()
{
trail = transform.GetChild(0).GetComponent<TrailRenderer>();
myRigidbody = GetComponent<Rigidbody2D>();
myRigidbody.isKinematic = true;
oldTime = trail.time;
}
开发者ID:loloop,项目名称:videogames-moveis,代码行数:7,代码来源:ColorBall.cs
示例5: Awake
void Awake()
{
owner = GetComponentInParent<AliveEntity>();
_collider = GetComponent<Collider>();
_sound = GetComponent<AudioSource>();
_trail = GetComponentInChildren<TrailRenderer>();
}
开发者ID:Lobo-Prix,项目名称:TeraTale,代码行数:7,代码来源:AttackSubjectImpl.cs
示例6: Start
void Start()
{
trail = GetComponent<TrailRenderer>();
SpriteRenderer spriteRenderer = GetComponent<SpriteRenderer>();
trail.sortingLayerID = spriteRenderer.sortingLayerID;
trail.sortingOrder = spriteRenderer.sortingOrder;
}
开发者ID:VervergGames,项目名称:Canonhero,代码行数:7,代码来源:TrailLayer.cs
示例7: Start
void Start()
{
m = (transform.position - target.transform.position).magnitude;
_TR = GetComponent<TrailRenderer>();
t = 0;
apply = false;
}
开发者ID:Dioptres,项目名称:lostStones,代码行数:7,代码来源:BulletScript.cs
示例8: Start
void Start()
{
obj = (GameObject)GameObject.Instantiate(obj);
// trailSub = transform.GetChild (0).gameObject;
trail = obj.GetComponent<TrailRenderer>();
player = transform.parent.transform.parent.gameObject;
pMov = player.GetComponent<Player_Movement>();
obj.collider2D.enabled = false;
obj.transform.parent = transform;
obj.GetComponent<HingeJoint2D>().anchor = new Vector2(-0.5f, 0);
obj.GetComponent<HingeJoint2D>().connectedBody = player.rigidbody2D;
obj.collider2D.enabled = true;
objMid = obj.GetComponentInChildren<GrapplingStalk>();
obj.SetActive(false);
end = (GameObject)GameObject.Instantiate(end);
end.transform.parent = transform.parent;
endScript = end.GetComponent<GrapplingEnd>();
endScript.setLayersToGrapple(possibleLayers);
endScript.Setup(obj);
endJoint = obj.AddComponent<HingeJoint2D>();
endJoint.anchor = new Vector2(0.5f, 0);
endJoint.connectedBody = end.rigidbody2D;
lasCon = obj.GetComponent<laserConnector>();
lasCon.endPoint = end.transform;
lasCon.startPoint = transform.parent;
lasCon.player = player.transform;
}
开发者ID:slehmann1,项目名称:purgatory,代码行数:27,代码来源:GrapplingHook.cs
示例9: ResetTrail
static IEnumerator ResetTrail(TrailRenderer trail)
{
var trailTime = trail.time;
trail.time = -1;
yield return new WaitForEndOfFrame();
trail.time = trailTime;
}
开发者ID:iangoegebuer,项目名称:LADN,代码行数:7,代码来源:BallCtl.cs
示例10: Awake
void Awake()
{
tr = this.GetComponent<TrailRenderer>();
rb = root.GetComponent<Rigidbody>();
animator = root.GetComponent<Animator>();
//ps = root.GetComponent<PlayerState>();
}
开发者ID:davidsiekut,项目名称:BirdSimulator2015,代码行数:7,代码来源:Contrail.cs
示例11: Awake
//Gets the balls rigid body
void Awake()
{
audio = GetComponent<AudioSource>();
rb = GetComponent < Rigidbody > ();
trail = gameObject.GetComponent<TrailRenderer>();
trail.material.color = Color.blue;
}
开发者ID:VanjaSorokin,项目名称:Breakout_Game,代码行数:8,代码来源:Ball.cs
示例12: Awake
void Awake()
{
trigger = GetComponent<CircleCollider2D> ();
body = GetComponent<Rigidbody2D> ();
trail = GetComponent<TrailRenderer> ();
aud = GetComponent<AudioSource> ();
}
开发者ID:41407,项目名称:zombie-apocalypse,代码行数:7,代码来源:Stalker.cs
示例13: Start
void Start()
{
Debug.Log("instantiating bullet");
rigidBody = this.GetComponent<Rigidbody2D>();
trail = this.gameObject.GetComponentInChildren<TrailRenderer>();
}
开发者ID:Bombergames,项目名称:Ricochet-Frontier-Demo,代码行数:7,代码来源:bulletScript.cs
示例14: Awake
void Awake()
{
defaultMat = GetComponent<Renderer>().material;
trail = GetComponent<TrailRenderer>();
trail.enabled = true;
halo = (Behaviour)GetComponent("Halo");
}
开发者ID:akriox,项目名称:Pets-Arena,代码行数:7,代码来源:BallController.cs
示例15: ManualStart
public void ManualStart()
{
transform.position = new Vector3(-1000, -1000, -1000);
spitRigidbody = GetComponent<Rigidbody>();
_trail = GetComponent<TrailRenderer>();
Disable();
}
开发者ID:pcpellegrini,项目名称:Aria,代码行数:7,代码来源:MonsterSpit.cs
示例16: Awake
void Awake()
{
base.Awake ();
m_transform = transform;
m_collider = GetComponent<Collider>();
mytrail = GetComponent<TrailRenderer>();
}
开发者ID:TrojanFighter,项目名称:U3D-DesignerBehaviorTest1,代码行数:7,代码来源:Ef_trackSword.cs
示例17: Start
// Use this for initialization
void Start ()
{
if (trail == null)
{
trail = GetComponent<TrailRenderer>();
}
trail.enabled = false;
}
开发者ID:JPStank,项目名称:CRISPY_Samurai,代码行数:9,代码来源:SlashToggle.cs
示例18: Start
void Start()
{
//Grab the linerenderer from the object and default it to disabled
trail = gameObject.GetComponent<TrailRenderer>();
trail.enabled = false;
trail.sortingLayerName = "Player";
trail.sortingOrder = 1;
}
开发者ID:BJarv,项目名称:UrsaMajor,代码行数:8,代码来源:trailToggle.cs
示例19: Start
// ReSharper restore UnusedMember.Local
// ReSharper disable UnusedMember.Local
private void Start()
{
_trailRenderer = GetComponent<TrailRenderer>();
_particles = transform.FindChild("Particles").gameObject;
_target = transform.FindChild("Target").gameObject;
_player = Player.Instance;
PlaceTarget();
}
开发者ID:0xc0dec,项目名称:ld27,代码行数:10,代码来源:Comet.cs
示例20: Start
void Start()
{
_trail = Component<TrailRenderer>();
_pool = Scene.Object<TrailDetectorPool>().Pool;
_lastDetector = _pool.RequestObject<TrailDetector>();
_lastDetector.gameObject.layer = _layer;
}
开发者ID:rhys-vdw,项目名称:birdy-hawk,代码行数:8,代码来源:TrailController.cs
注:本文中的UnityEngine.TrailRenderer类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论