本文整理汇总了C#中Minion类的典型用法代码示例。如果您正苦于以下问题:C# Minion类的具体用法?C# Minion怎么用?C# Minion使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Minion类属于命名空间,在下文中一共展示了Minion类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Open
public void Open(List<Minion> minions, List<Note> notes)
{
//Transform parent = this.transform.parent;
this.minion = null;
foreach (Minion m in minions) {
if (m.gameObject.name == this.minionName) {
this.minion = m;
break;
}
}
this.note = null;
foreach (Note n in notes) {
if (n.gameObject.name == this.noteName) {
this.note = n;
break;
}
}
if (this.minion != null) {
this.minion.EnableClicks();
this.minion.gameObject.GetComponent<SpriteRenderer>().color = Color.white;
}
if (this.note != null) {
this.note.EnableClicks();
this.note.gameObject.GetComponent<SpriteRenderer>().color = Color.white;
}
}
示例2: Spawn
public static void Spawn(Minion prefab, bool toLeft, float pos)
{
Minion m = Instantiate(prefab);
m.center = GameObject.FindGameObjectWithTag("Center").transform;
m.DirectionIsToLeft = toLeft;
m.Position = pos;
}
示例3: FightBack
public override void FightBack(Minion _me, Minion _target)
{
if (_target.ContainTag(Tag.CloseCombat))
{
_target.BeingFightBack(_me);
}
}
示例4: SpawnMinion
protected void SpawnMinion(GameObject prefab, Vector3 position, Minion.MinionEventHandler deathCallBack)
{
GameObject spawned = Instantiate(prefab, position, Quaternion.identity) as GameObject;
spawned.SendMessage("SetWalkTarget", transform.position);
Minion minionScript = spawned.GetComponent<Minion>();
minionScript.OnMinionDeath += deathCallBack;
}
示例5: AfterMinionDied
public override void AfterMinionDied(Minion _me)
{
if (_me == null) return;
Player tPlayer = GameManager.Instance.GetPlayerByType(_me.PlayerType);
if (tPlayer == null) return;
tPlayer.AddEnergy(HeroEnergyName.Death, deathEnergyAdd);
}
示例6: Excute
public override void Excute(Minion _minion, PositionVO _target)
{
base.Excute(_minion, _target);
Minion targetMinion = MinionManager.Instance.GetMinionByPosition(_target);
if (targetMinion == null)
return;
targetMinion.BeingAttacked(_minion);
}
示例7: BeingAttacked
public override BeingAttackedResult BeingAttacked(Minion _me, BeingAttackedResult _result)
{
if (_result.attackFrom.Position.MinionSlotPosition == MinionSlotPosition.Foreward)
{
_result.hurtVO *= 2;
}
return _result;
}
示例8: ReleaseMinion
public virtual void ReleaseMinion(Minion minion)
{
if (Minions.Contains(minion))
{
RelativeStrength -= minion.RelativeStrength;
Minions.Remove(minion);
}
}
示例9: OnStateEnter
public override void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
{
base.OnStateEnter(animator, stateInfo, layerIndex);
mn = animator.GetComponent<Minion>();
mn.MyRgd.constraints = RigidbodyConstraints.None;
elapsed = 0.0f;
}
示例10: MinionMovePosition
public override MinionMovePositionResult MinionMovePosition(Minion _me, MinionMovePositionResult _result)
{
base.MinionMovePosition(_me, _result);
if (_result.target.MinionSlotPosition == MinionSlotPosition.Backward)
{
_me.RemoveBuff(this);
}
return _result;
}
示例11: PlayerTurnStart
public override void PlayerTurnStart(Minion _me)
{
base.PlayerTurnStart(_me);
duration--;
if (duration == 0)
{
_me.RemoveBuff(this);
}
}
示例12: Spawn
public Minion[] Spawn(Vector3 position)
{
Minion[] minions = new Minion[Count];
for (int i = 0; i < Count; i++)
{
minions[i] = MinionManager.SpawnMinion(position, MinionType);
}
return minions;
}
示例13: SetTarget
public void SetTarget(SelectionRegion Selected)
{
if (Selected == null || !Selected.Enabled || !typeof(SelectionRegion).IsAssignableFrom(Selected.GetType())) {
return;
}
Morphid = Selected.Morphid;
Lane = Selected.Lane;
Minion = Selected.Minion;
}
示例14: Start
void Start()
{
parentMinion = transform.parent.gameObject.GetComponent<Minion>();
if (tag == "DetectCollider")
{
finalDestination = (parentMinion.team == 0) ? new Vector3(128, 14, 128) : new Vector3(-128, 14, -128);
}
}
示例15: PlayerTurnEnd
public override void PlayerTurnEnd(Minion _me)
{
base.PlayerTurnEnd(_me);
--duration;
if (duration <= 0)
{
_me.RemoveBuff(this);
}
}