public static int GetAttack(Follower f) { // 基础战力 + (星级基础战力 + 星级战力成长 * 等级) * 成长细数 int attack = f.BasicAttack; attack += (int)(GetGrowAttack(f.CurStar, f.CurLevel) * f.GrowRatio); return attack; }
static void Main(string[] args) { PlayerObject.Instance.Self.Money = 99999; PlayerObject.Instance.Self.Exp = 99999; Follower f1 = new Follower(); Console.WriteLine(FollowerLogic.GetAttack(f1)); var p = FollowerLevelLogic.UpgradeRequire(f1); if (p != null) { Console.WriteLine(p.Exp); Console.WriteLine(p.Money); } FollowerLevelLogic.Upgrade(f1); Console.WriteLine(FollowerLogic.GetAttack(f1)); var p2 = FollowerLevelLogic.UpgradeRequire(f1); if (p2 != null) { Console.WriteLine(p2.Exp); Console.WriteLine(p2.Money); } FollowerLevelLogic.Upgrade(f1); Console.WriteLine(FollowerLogic.GetAttack(f1)); }
public static void GoRest(Follower follower) { var msg = new FightMessage() { PlayerId = PlayerObject.Instance.Self.PlayerId, ObjectId = follower.ObjectId, FightType = FightMessage.GoToRest, }; MessageManager.SendMessage("Client.Send", msg); }
public FollowerSprite(Follower follower, bool CreateAvator = false) { if(CreateAvator) { var sprite = new CCSprite(@"face/" + follower.Avatar); InitWithSprite(follower, sprite); } else { Init(follower); } }
static void Main(string[] args) { ModuleManager.Instance.Init(); var FollowerLevelModule = ModuleManager.Instance.GetModule("FollowerLevelModule"); var FollowerModule = ModuleManager.Instance.GetModule("FollowerModule"); var FollowerStarModule = ModuleManager.Instance.GetModule("FollowerStarModule"); var FollowerCollectModule = ModuleManager.Instance.GetModule("FollowerCollectModule"); var follower = new Follower() { CurStar = 1, CurLevel = 2, }; //-------------------------FollowerLevelModule------------------------------- Console.WriteLine((FollowerLevelModule.CallFunc("CanUpgrade", follower)[0].ToString())); Console.WriteLine(((Package)FollowerLevelModule.CallFunc("UpgradeRequire", follower)[0]).Exp); Console.WriteLine(FollowerLevelModule.CallFunc("Upgrade", follower)[0].ToString()); Console.WriteLine(((Package)FollowerLevelModule.CallFunc("UpgradeRequire", follower)[0]).Exp); //-------------------------FollowerModule------------------------------------ Console.WriteLine(FollowerModule.CallFunc("GetAttack", follower)[0].ToString()); //-------------------------FollowerModule------------------------------------ Console.WriteLine(follower.CurStar + " " + follower.CurLevel); Console.WriteLine(FollowerStarModule.CallFunc("CanUpgrade", follower)[0].ToString()); follower.CurLevel = 31; Console.WriteLine(FollowerStarModule.CallFunc("CanUpgrade", follower)[0].ToString()); Console.WriteLine(((Package)FollowerStarModule.CallFunc("UpgradeRequire", follower)[0]).Exp); Console.WriteLine(((Package)FollowerStarModule.CallFunc("UpgradeRequire", follower)[0]).Money); Console.WriteLine(FollowerStarModule.CallFunc("Upgrade", follower)[0].ToString()); Console.WriteLine(follower.CurStar + " " + follower.CurLevel); FollowerCollect fc = new FollowerCollect() { Followers = new List<Follower>() }; fc.Followers.Add(follower); Console.WriteLine(FollowerCollectModule.CallFunc("GetAttack", fc)[0].ToString()); var packages = FollowerPackageModule.GetFollowerPackages(); Console.ReadKey(); }
public int GetAttack(Follower f) { return (int)(double)GetAttackFunc.Call(f)[0]; }
private void OnStatusChange(Follower obj) { if (obj.IsFighting) { FollowerCollectLogic.GoRest(obj); } else { FollowerCollectLogic.GoFight(obj); } }
public void AddFollower(Follower f) { Followers.Add(f); }
private void Init(Follower follower) { HasBorder = true; BindFollower = follower; FollowerNameNode = new CCLabel("", "Consolas", 10); FollowerLevelNode = new CCLabel("", "Consolas", 10); FollowerStarNode = new CCLabel("", "Consolas", 10); FollowerLevelNode.AnchorPoint = CCPoint.Zero; FollowerStarNode.AnchorPoint = CCPoint.Zero; SetFollowerName(CurrName); SetFollowerLevel(CurrLevel); SetFollowerStar(CurrStar, CurrStar + RestStar); this.AddChild(FollowerNameNode); this.AddChild(FollowerLevelNode); this.AddChild(FollowerStarNode); RefreshContentSize(); RefreshNodePos(); }
public FollowerSprite(Follower follower, CCSprite sprite) { InitWithSprite(follower, sprite); }
public static bool Upgrade(Follower f) { f.CurLevel++; return true; }
public static Package UpgradeRequire(Follower f) { var p = new Package(); p.Exp = 100; return p; }
public static bool CanUpgrade(Follower f) { return true; }
public static void HireFollower(Follower follower) { HireFollower(follower.Id, PlayerObject.Instance.Self.PlayerId); }
public Package UpgradeRequire(Follower follower) { return (Package)UpgradeRequireFunc.Call(follower)[0]; }
public bool Upgrade(Follower follower) { return (bool)UpgradeFunc.Call(follower)[0]; }
private void InitWithSprite(Follower follower, CCSprite avator) { Init(follower); if (avator != null) { avator.AnchorPoint = CCPoint.Zero; FollowerAvatorNode = avator; FollowerAvatorNode.Position = new CCPoint(2, 2); this.AddChild(FollowerAvatorNode); } }
public static Package UpgradeRequire(Follower f) { return null; }