当前位置: 首页>>代码示例>>C#>>正文


C# Minion类代码示例

本文整理汇总了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;
        }
    }
开发者ID:bluquar,项目名称:martian-music-invasion,代码行数:29,代码来源:TutorialBox.cs

示例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;
 }
开发者ID:peperbol,项目名称:BuildingHorizon,代码行数:7,代码来源:Minion.cs

示例3: FightBack

 public override void FightBack(Minion _me, Minion _target)
 {
     if (_target.ContainTag(Tag.CloseCombat))
     {
         _target.BeingFightBack(_me);
     }
 }
开发者ID:NextPeter,项目名称:CardGame,代码行数:7,代码来源:NormalFightBackStrategy.cs

示例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;
 }
开发者ID:WondermSwift,项目名称:unity_moba_sandbox,代码行数:7,代码来源:LaneSpawner.cs

示例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);
 }
开发者ID:NextPeter,项目名称:CardGame,代码行数:7,代码来源:AddDeathEnergyAfterDeathBuff.cs

示例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);
    }
开发者ID:NextPeter,项目名称:CardGame,代码行数:8,代码来源:DefaultAttackStrategy.cs

示例7: BeingAttacked

 public override BeingAttackedResult BeingAttacked(Minion _me, BeingAttackedResult _result)
 {
     if (_result.attackFrom.Position.MinionSlotPosition == MinionSlotPosition.Foreward)
     {
         _result.hurtVO *= 2;
     }
     return _result;
 }
开发者ID:NextPeter,项目名称:CardGame,代码行数:8,代码来源:SurroundedBuff.cs

示例8: ReleaseMinion

	public virtual void ReleaseMinion(Minion minion)
	{
		if (Minions.Contains(minion))
		{
			RelativeStrength -= minion.RelativeStrength;
			Minions.Remove(minion);
		}
	}
开发者ID:ADoby,项目名称:Summoneer,代码行数:8,代码来源:Owner.cs

示例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;
    }
开发者ID:heyx3,项目名称:Warmage,代码行数:8,代码来源:Flail.cs

示例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;
 }
开发者ID:NextPeter,项目名称:CardGame,代码行数:9,代码来源:SurroundedBuff.cs

示例11: PlayerTurnStart

 public override void PlayerTurnStart(Minion _me)
 {
     base.PlayerTurnStart(_me);
     duration--;
     if (duration == 0)
     {
         _me.RemoveBuff(this);
     }
 }
开发者ID:NextPeter,项目名称:CardGame,代码行数:9,代码来源:AddPhysicalAttackBuff.cs

示例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;
	}
开发者ID:ADoby,项目名称:Summoneer,代码行数:9,代码来源:MinionSpawnInfo.cs

示例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;
 }
开发者ID:foxor,项目名称:MorphiumCard,代码行数:9,代码来源:Targeting.cs

示例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);
        }
    }
开发者ID:andeart,项目名称:VersionControlPoints,代码行数:9,代码来源:MinionColliderAI.cs

示例15: PlayerTurnEnd

 public override void PlayerTurnEnd(Minion _me)
 {
     base.PlayerTurnEnd(_me);
     --duration;
     if (duration <= 0)
     {
         _me.RemoveBuff(this);
     }
 }
开发者ID:NextPeter,项目名称:CardGame,代码行数:9,代码来源:SlowedBuff.cs


注:本文中的Minion类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。