本文整理汇总了C#中Effects类的典型用法代码示例。如果您正苦于以下问题:C# Effects类的具体用法?C# Effects怎么用?C# Effects使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Effects类属于命名空间,在下文中一共展示了Effects类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: HandleTranslatedtoHiddenPosition
public void HandleTranslatedtoHiddenPosition(Effects.Effect effect)
{
Visible = false;
if (OnHidden != null) {
OnHidden (this);
}
}
示例2: TransitionState
public void TransitionState(OnEndFadeIn FadeIn,OnEndFadeOut FadeOut,_TransitionType TT)
{
switch (TT) {
case _TransitionType.FadeOut_In:
CurrentEffectObj = Instantiate (EffectObj)as GameObject;
CurrentEffectScript = CurrentEffectObj.GetComponentInChildren<Effects> ();
CurrentEffectScript.EndFadeOutEvent += () => {
FadeOut();
doFadeIn ();
};
CurrentEffectScript.EndFadeInEvent += () => {
FadeIn ();
Destroy (CurrentEffectObj);
};
doFadeOut ();
break;
case _TransitionType.No_Effect:
FadeOut ();
FadeIn ();
break;
}
}
示例3: OutputEnum
public static void OutputEnum(Effects.Property enumProperty, Formatter output)
{
OutputVersionConditional(enumProperty.WinVer, output);
output.WriteLine("[version(VERSION)]");
output.WriteLine("typedef enum " + enumProperty.TypeNameIdl);
output.WriteLine("{");
output.Indent();
for (int i = 0; i < enumProperty.EnumFields.FieldsList.Count; ++i)
{
var enumValue = enumProperty.EnumFields.FieldsList[i];
if (i != (enumProperty.EnumFields.FieldsList.Count - 1))
{
output.WriteLine(enumValue.Name + " = " + i.ToString() + ",");
}
else
{
output.WriteLine(enumValue.Name + " = " + i.ToString());
}
}
output.Unindent();
output.WriteLine("} " + enumProperty.TypeNameIdl + ";");
EndVersionConditional(enumProperty.WinVer, output);
}
示例4: TargetSpell
public TargetSpell(JSONObject js) : base(js)
{
Id = (int)js.GetField(js.keys[0]).n;
AreaId = (int)js.GetField("areaId").n;
EffectsArea = new Effects(js.GetField("effectsAreaIds"));
EffectsAreaCrit = new Effects(js.GetField("effectsAreaCritIds"));
_rangeId = (int)js.GetField("rangeId").n;
}
示例5: Start
// Use this for initialization
void Start()
{
if (!player)
player = GetComponent<Player> ();
if(!rb)
rb = GetComponent<Rigidbody>();
effects = Player.Effects;
}
示例6: DialogueConversationNode
public DialogueConversationNode(bool waitUserInteraction)
{
dialogue = new List<ConversationLine>();
nextNode = null;
terminal = true;
effects = new Effects();
this.keepShowing = waitUserInteraction;
}
示例7: Awake
public virtual void Awake()
{
//DefaultPosition = transform.position;
//DefaultRotation = transform.rotation;
Effects = new Effects();
_renderer = GetComponent<Renderer>();
if (_renderer == null)
_renderer = GetComponentInChildren<Renderer>();
}
示例8: SelfSpell
public SelfSpell(JSONObject js) : base(js)
{
Id = (int)js.GetField(js.keys[0]).n;
AreaId = (int)js.GetField("areaId").n;
EffectsArea = new Effects(js.GetField("effectsAreaIds"));
EffectsAreaCrit = new Effects(js.GetField("effectsAreaCritIds"));
_effects = new Effects(js.GetField("effectsIds"));
_effectsCrit = new Effects(js.GetField("effectsCritIds"));
}
示例9: Cutscene
/**
* Creates a new cutscene
*
* @param type
* The type of the scene
* @param id
* The id of the scene
*/
protected Cutscene(GeneralSceneSceneType type, string id)
: base(type, id)
{
effects = new Effects();
destinyX = int.MinValue;
destinyY = int.MaxValue;
transitionType = NextSceneEnumTransitionType.NO_TRANSITION;
transitionTime = 0;
next = GOBACK;
}
示例10: SimplifierContext
public SimplifierContext(bool inGlobalScope, bool keepFunctionNames, NameSupply nameSupply, Func<Expression, bool> isValue)
{
InGlobalScope = inGlobalScope;
KeepFunctionNames = keepFunctionNames;
NameSupply = nameSupply;
subst = new Map<Identifier, Expression>();
statements = null;
contextEffects = Effects.Bottom;
this.isValue = isValue;
}
示例11: AnimationExtention_should_serialize_property_opacity_animation
public void AnimationExtention_should_serialize_property_opacity_animation()
{
Effects effect = new Effects();
effect.Container.Add(new PropertyAnimation(PropertyAnimationType.Opacity));
_writer.Setup(w => w.Write(It.IsAny<string>())).Verifiable();
_objectWriter.Start().Serialize("effects", effect);
_writer.Verify(w => w.Write("effects:{list:[{name:'property',properties:['opacity']}],openDuration:200,closeDuration:200}"));
}
示例12: AnimationExtention_should_serialize_slide_animation
public void AnimationExtention_should_serialize_slide_animation()
{
Effects effect = new Effects();
effect.Container.Add(new SlideAnimation());
_writer.Setup(w => w.Write(It.IsAny<string>())).Verifiable();
_objectWriter.Start().Serialize("effects", effect);
_writer.Verify(w => w.Write("effects:{list:[{name:'slide'}],openDuration:200,closeDuration:200}"));
}
示例13: Start
void Start ()
{
int whatPower = Random.Range(0, itensNumber);
switch (whatPower)
{
case 0: effect = Effects.SpeedPlus; this.GetComponent<SpriteRenderer>().sprite = powersSprites[0]; break;
case 1: effect = Effects.SpeedMinus; this.GetComponent<SpriteRenderer>().sprite = powersSprites[1]; break;
case 2: effect = Effects.AmmoPlus; this.GetComponent<SpriteRenderer>().sprite = powersSprites[2]; break;
case 3: effect = Effects.AmmoMinus; this.GetComponent<SpriteRenderer>().sprite = powersSprites[3]; break;
}
}
示例14: NextScene
/**
* Creates a new NextScene
*
* @param nextSceneId
* the id of the next scene
*/
public NextScene(string nextSceneId)
{
this.nextSceneId = nextSceneId;
destinyX = int.MinValue;
destinyY = int.MinValue;
conditions = new Conditions();
effects = new Effects();
postEffects = new Effects();
transitionType = NextSceneEnumTransitionType.NO_TRANSITION;
transitionTime = 0;
}
示例15: Export
public static void Export(Effects effects)
{
SaveFileDialog sfd = new SaveFileDialog();
sfd.Filter = WYZTracker.Core.Properties.Resources.FXFilter;
if (sfd.ShowDialog() == DialogResult.OK)
{
XmlSerializer formatter = new XmlSerializer(typeof(Effects));
Stream objFileStream = new FileStream(sfd.FileName, FileMode.Create, FileAccess.Write, FileShare.None);
formatter.Serialize(objFileStream, effects);
objFileStream.Close();
}
}